extjs combobox为什么下拉框就显示一次,以后再点击下面是空白
//ComboboxExt.define('AM.view.user.Demo',{extend:'Ext.form.ComboBox',alias:'widget.us...
//Combobox
Ext.define('AM.view.user.Demo' ,{
extend: 'Ext.form.ComboBox',
alias : 'widget.userdemo',
store:
new Ext.data.JsonStore({
proxy: {
type: 'ajax',
url: 'data/users.json',
reader: {
type: 'json',
root: 'users',
idProperty: 'name'
}
},
fields: ['name', 'email']
}),
mode:'remote',
//store : 'Users',
//mode: 'local',
valueField : "name",
displayField : "email",
//mode : "remote",
triggerAction : "all",
editable : false,
allowBlank : false
});
//json
{
users: [
{name: 'Ed', email: 'ed@sencha.com'},
{name: 'Tommy', email: 'tommy@sencha.com'}
]
} 展开
Ext.define('AM.view.user.Demo' ,{
extend: 'Ext.form.ComboBox',
alias : 'widget.userdemo',
store:
new Ext.data.JsonStore({
proxy: {
type: 'ajax',
url: 'data/users.json',
reader: {
type: 'json',
root: 'users',
idProperty: 'name'
}
},
fields: ['name', 'email']
}),
mode:'remote',
//store : 'Users',
//mode: 'local',
valueField : "name",
displayField : "email",
//mode : "remote",
triggerAction : "all",
editable : false,
allowBlank : false
});
//json
{
users: [
{name: 'Ed', email: 'ed@sencha.com'},
{name: 'Tommy', email: 'tommy@sencha.com'}
]
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询