[英]How to bring multiple i item inside the same tab tabpanel
How to bring multiple i item inside the same tab tabpanel.如何将多个 i 项目带入同一个选项卡选项卡面板中。
I have a tabPanel where in first tab I am have button.我有一个 tabPanel,在第一个选项卡中我有按钮。 While clicking on the button of tab1 i want to display panel3 instead of panel.
单击 tab1 的按钮时,我想显示 panel3 而不是面板。 Is any work around for that.
是否有任何解决方法。
Ext.create('Ext.tab.Panel', {
width : 200,
height : 200,
renderTo : Ext.getBody(),
items : [{
title : 'tab1',
items : [{
xtype :"panel",
itemId : "panel1"
},{
xtype : "button"
}]
}, {
title : 'tab2',
items : [{
xtype :"panel",
itemId : "panel2"
}]
}]
});
//
{
xtype :"panel",
itemId : "panel3"
}
Is there any help while clicking on button i can load new component called "panel3"单击按钮时是否有任何帮助我可以加载名为“panel3”的新组件
You can use card if you planning change between panel3
and tabpanel
with the ability to switch back如果您计划在
panel3
和tabpanel
之间切换并能够切换回来,您可以使用卡片
var tab = Ext.create('Ext.tab.Panel', {
width: 200,
height: 200,
items: [{
title: 'tab1',
items: [{
xtype: "panel",
itemId: "panel1"
}, {
xtype: "butt
on",
text: 'change panel',
handler: function () {
mainPanel.getLayout().next()
// mainPanel.remove(tab);
// mainPannel.add(panel);
}
}]
}, {
title: 'tab2',
items: [{
xtype: "panel",
itemId: "panel2"
}]
}]
});
//
var panel = Ext.widget({
xtype: "panel",
itemId: "panel3",
html: 'Hi, I`m panel3'
})
var mainPanel = Ext.widget({
layout: 'card',
xtype: 'panel',
renderTo: Ext.getBody(),
items: [tab, panel]
})
Or you can just remove tabpanel and add panel或者您可以删除 tabpanel 并添加面板
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.