我无法将内联数组数据加载到商店中。特别是,这失败了。有人可以解释为什么吗?我什至尝试使用数组读取器添加内存代理,但仍然没有骰子。
Ext.define('MyApp.store.ComboboxState', {
extend: 'Ext.data.Store',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
storeId: 'ComboboxState',
data: [
[
'AL',
'Alabama'
]
]
,fields: [
{
name: 'state'
},
{
name: 'name'
}
]
}, cfg)]);
}
});
仍然不适用于此内存代理/数组读取器:
proxy: {
type: 'memory',
reader: {
type: 'array'
}
}