Extjs6.0 Commbox 绑定stroe数据
{
xtype: 'combobox',columnWidth: 1,
fieldLabel: '被评代理机构',
id:'AgencyJG',
name: 'AgencyJG',
displayField: 'agencyName', // 这里是下拉框显示值
valueField: 'agencyKey', // 这里是form 表单提交的真实值
emptyText: '可选择多个代理机构! ',
multiSelect: true,
queryMode: 'local',
forceSelection: true,
allowBlank: false,
anyMatch: true,
store: Ext.create('Ext.data.Store', {
fields: ['agencyName', 'agencyKey'],// 需要显示的哪些值
proxy : {
type : 'ajax',
url :'/ZLXT/api/agency/list', // 接口地址
actionMethods: {
read: 'POST'
},
extraParams:{},
reader: {
type: 'json',
rootProperty: "resultData",
messageProperty: 'msg',
totalProperty: 'total'
}
},
autoLoad: true
})
}