87,992
社区成员
发帖
与我相关
我的任务
分享
items : [{// 定义选项卡
title : 'Headers',
id : 'headers',
xtype : 'hbox'
// hidden : true
}, {
title : 'Cookies',
id : 'cookies',
xtype : 'hbox'
}, {
title : 'Query',
id : 'query',
xtype : 'hbox'
}, {
title : 'Post',
id : 'post',
xtype : 'hbox'
}]
Ext.define('app.view.tabpanel.Hbox', {
//创建一个Hbox。用来平分panel画板,并在hbox中添加两个画板,存放两个grid
extend : 'Ext.Panel',
xtype : 'hbox',
layout : {
type : 'hbox',
align : 'stretch'
},
padding : 10,
items : [{
xtype : 'panel',
items : {
xtype : 'TabPanel1'
},
flex : 1//宽度占比1份
}, {
xtype : 'panel',
items : {
id : 'tabPanel22',
xtype : 'TabPanel2'
},
flex : 1
}]
})
Ext.define('app.view.tabpanel.TabPanel1', {
extend : 'Ext.grid.Panel',
xtype : 'TabPanel1',
border : '1,1,1,1',
autoScroll:true,
height : 300,
// id : 'tabPanel1',
viewConfig : {
forceFit : false,
columnLines : true,// 显示表格竖线
stripeRows : true
// 在表格中显示斑马线
},
autoExpandMax : true,
store : {
storeId : 'store2',
model : 'app.model.TabPanelModel1',// 定义model
proxy : {// 代理获取json数据
type : 'ajax',
url : 'app/store/store2.json',
reader : {
type : 'json'
}
},
autoLoad : false
},
columns : [// 定义grid表头
{
flex : 0.5,
text : 'name',
dataIndex : 'name'
}, {
flex : 0.5,
text : 'value',
dataIndex : 'value'
}]
})


