我的基类中有一个组合框,我只配置“字段”属性。像这样:
items: [
comboText = Ext.create('Ext.form.ComboBox', {
width: 150,
padding: '0 20 0 0',
displayField: 'label',
store: Ext.create('Ext.data.Store', {
fields: [
{type: 'string', name: 'label'},
{type: 'string', name: 'fieldName'}
]
})
}),
...]
如何仅将数据属性传递给此组合?我尝试了下面的代码但不起作用:
comboTest.store.loadData(value);
其中 value 包含这样的数组:
[
{"label":"First name", "fieldName":"firstname"},
{"label":"Birth date", "fieldName":"birthdate"}
]
没有错误,但组合框什么也不打开。