简体   繁体   English

在ExtJS 4的选项卡面板中,如何创建父选项卡包括2个子选项卡

[英]In the tabpanel of ExtJS 4, how to create parent tab includes 2 child tab

I have 2 parent tabs, each tab includes 2 child tab. 我有2个父选项卡,每个选项卡都包含2个子选项卡。 pls see the picture for more detail: 请查看图片以获取更多详细信息: 在此处输入图片说明

How to create the group tab for the parent tab and when the author click the parent tab, the child tab will be shown. 如何为父选项卡创建组选项卡,当作者单击父选项卡时,将显示子选项卡。 Thanks 谢谢

Ext.widget('tabpanel', {
    width: 500,
    activeTab: 0,
    items: [{
        title: 'Parent Tab 1',
        items : [
            Ext.widget('tabpanel', {
                activeTab: 0,
                 items : [{
                    title: 'Child Tab 1',
                    bodyPadding: 10,
                    html : "My content of Child Tab 1 here"
                },{
                    title: 'Child Tab 2',
                    bodyPadding: 10,
                    html : "My content of Child Tab 2 here"
                }]
            })
        ]
    },{
        title: 'Parent Tab 2',
        bodyPadding: 10,
        html : "Parent Tab 2 content here without child tabs"
    }]
});

Here is a fiddle with an example of Parent tab containg child tabs : 这是一个带有父选项卡包含子选项卡的示例的小提琴:

http://jsfiddle.net/Q7f5q/200/ http://jsfiddle.net/Q7f5q/200/

Hope it is what you looking for. 希望它是您想要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM