sencha combobox下拉框不用jsonstore,直接使用字符串数组做数据源

combobox下拉框的store除了可以选择一个jsonstore来加载数据,还可以直接使用符串Array做数据源.

{
                    xtype: 'combobox',
                    fieldLabel: 'Label',
                    store: [
                        'aa',
                        'bb',
                        'cc'
                    ],
                    listeners: {
                        change: {
                            fn: me.onComboboxChange,
                            scope: me
                        }
                    }
                }

sencha architecture里设置如下(点击store前面的小图标弹出选择项,选择Array,然后直接赋值.):

 

效果如下:

posted @ 2015-10-28 10:27  Ace001  阅读(415)  评论(0编辑  收藏  举报