87,991
社区成员
发帖
与我相关
我的任务
分享Ext.regModel('BaseData', {
fields: [
{name: 'id', type: 'string'},
{name: 'label', type: 'string'},
{name: 'value', type: 'string'}
]
});
Ext.define('Ext.components.BaseDataComboBox',{
extend : 'Ext.form.field.ComboBox',
xtype : 'baseDataComboBox',
typeAhead : true,
editable : true,
displayField : "label",
valueField : "value",
queryMode : 'local',
initComponent : function(){
this.store = Ext.create('Ext.data.Store', {
model: 'BaseData',
proxy : {
type : 'ajax',
actionMethods : {
read : 'POST'
},
url : '***************',
extraParams : {
key : this.getValue()
}
},
autoLoad : false
});
this.listeners = {
change : function(me){
me.getStore().load();
}
};
this.callParent(arguments);
}
});