0

我有两个带有不同 ExtJS formpanels 的 .js 文件,我将它们的 onReady() 读取到 HTML 文件中的 DIV:

myPanel.render( 'myDiv' );

我想将它们添加/渲染到标签面板。

有没有简单的方法可以做到这一点?如果是这样,怎么办?

谢谢,史蒂夫

4

1 回答 1

0

像这样?

Ext.define('MyApp.view.MyTabPanel', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.MyTabPanel',
    itemId: 'MyTabPanel',
    items: [
        {
            xtype: 'panel',
            title: 'Tab panel with the form',
            items: [myPanel] //the form panel
        }
    ]
});

//...

Ext.widget('MyTabPanel', { renderTo: 'myDiv'});
于 2014-10-10T15:05:26.617 回答