Extjs中combobox 在toolbar上显示
后台返回的json数据{"items":[{"describe":"类型1","id":1,"name":"Shop","type":1},{"describe":"类型...
后台返回的json数据
{"items":[{"describe":"类型1","id":1,"name":"Shop","type":1},{"describe":"类型2",,"id":2,"name":"GuildCombat","type":2},{"describe":"类型
3","id":3,"name":"Combat","type":3},],"total":3}
求教如何正常显示 展开
{"items":[{"describe":"类型1","id":1,"name":"Shop","type":1},{"describe":"类型2",,"id":2,"name":"GuildCombat","type":2},{"describe":"类型
3","id":3,"name":"Combat","type":3},],"total":3}
求教如何正常显示 展开
1个回答
展开全部
在tbar上没有什么特殊啊~~~
简单写了一个
Ext.onReady(function() {
var genus_store = new Ext.data.SimpleStore( {
fields : [ 'value', 'text' ],
data : [ [ 'ZZ', '证照' ], [ 'ZX', '照相' ], [ 'LX', '录像' ],
[ 'LY', '录音' ], [ 'RY', '荣誉实物' ], [ 'YZ', '印章' ] ]
});
var form_condition = new Ext.FormPanel( {
split : false,
labelWidth : 80,
frame : true,
width : 275,
defaults : {
width : 150
},
labelAlign : 'right',
defaultType : 'textfield',
autoScroll : true,
tbar:[{
xtype : 'combo',
name : 'genus',
id : 'genus_id',
mode : 'local',
readOnly : false,
triggerAction : 'all',
emptyText : '属类',
store : genus_store,
hiddenName : 'genus',
valueField : 'value',
displayField : 'text'
}]
});
var win = new Ext.Window( {
title : '登录',
width : 340,
height : 230,
layout : "fit",
plain : true,
modal : true,
closeAction : "hide",
items : [ form_condition ]
});
win.show();
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询