发布网友 发布时间:2022-04-22 14:05
共2个回答
热心网友 时间:2023-10-02 05:35
Ext.create('Ext.panel.Panel', {
width: 500,
height: 300,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'South Region is resizable',
region: 'south', // position for region
xtype: 'treepanel',
height: 100,
store : Ext.create('Ext.data.TreeStore',{
root:{
expanded:true,
children:[{ text:"detention", leaf:true},{ text:"homework", expanded:true, children:[{ text:"book report", leaf:true},{ text:"alegrbra", leaf:true}]},{ text:"buy lottery tickets", leaf:true}]}}),
split: true, // enable resizing,
listeners : {
itemclick: function(){
Ext.getCmp(''center'').add({xtype:'panel',html:'test'});
}
},
margins: '0 5 5 5'
},{
// xtype: 'panel' implied by default
title: 'West Region is collapsible',
region:'west',
xtype: 'panel',
margins: '5 0 0 5',
width: 200,
collapsible: true, // make collapsible
id: 'west-region-container',
layout: 'fit'
},{
title: 'Center Region',
id :'center',
region: 'center', // center region is required, no width/height specified
xtype: 'panel',
layout: 'fit',
margins: '5 5 0 0'
}],
renderTo: Ext.getBody()
});追问确实是有个界面,但不是我想要的呀,我要的是west是树,点击west中的树,在center中展示树中叶子的不同界面,不过还是谢谢大虾
热心网友 时间:2023-10-02 05:35
是用iframe