我创建了一个 ExtJS 嵌套选项卡面板,但我不知道如何切换嵌套选项卡。任何人都可以帮助我。非常感谢。
下面是我的js代码:
var clubs = new Ext.TabPanel({
renderTo:'clubs',
activeTab:0,
autoHeight:true,
defaults:{
autoHeight:true,
cls:'tab-panel-item'
},
items:[{
title:'Shanghai',
cls:'nested-tab',
id:'shanghai-tab',
items:{
xtype:'tabpanel',
defaults:{ cls:'tab-panel-item', autoHeight:true },
containerCls:'nested-tab',
activeTab:0, // required
items:[{
contentEl:'badminton',
title:'Badminton'
},{
contentEl:'basketball',
title:'Basketball'
}]
}
},{
title:'Hangzhou',
cls:'nested-tab',
items:{
xtype:'tabpanel',
defaults:{ cls:'tab-panel-item', autoHeight:true },
containerCls:'nested-tab',
activeTab:0, // required
items:[{
contentEl:'hz-parent-child',
title:'Parent-child'
},{
contentEl:'hz-football',
title:'Football'
}]
}
}]
});
我尝试了激活(),但它只能切换父选项卡。