如何在一个选项卡中Ext.tab.Panel输出两个Ext.grid.Panel。 Extjs

时间:2018-09-15 17:02:02

标签: javascript user-interface extjs

如何在Mytab1选项卡的Ext.tab.Panel中加载两个Ext.grid.Panel? 在app.js文件中,我得到了Ext.tab.Panel:

Ext.application({
    requires: ['Ext.container.Viewport'],
    name: 'BookApp',
    appFolder: 'static/hello_extjs',
    controllers: ['Books'],
    launch: function () {
        Ext.create('Ext.container.Viewport', {
            layout: 'border',
            items: [
                {
                    region: 'north',
                    xtype: 'maintab'
                }
            ]
        });
    }
});

在Ext.tab.Panel中,我不知道如何正确形成将加载两个Ext.grid.Panel的项目Mytab1:

Ext.define('BookApp.view.MainTab', {
    extend: 'Ext.tab.Panel',
    xtype: 'maintab',
    alias: 'widget.maintab',
    title: 'Панель вкладок',
    items: [
        {
            items:  //How to do what would be displayed two grids
                title: 'Mytab1',
            border: false,
            layout: 'fit',
            header: false
        },
        {
            items: 'booklist',//What exactly is necessary to point out that one grid
            title: 'Mytab2',
            border: false,
            layout: 'fit',
            header: false
        }
    ]
});

1 个答案:

答案 0 :(得分:0)

您必须将网格放入项目中,并从xtype属性:FIDDLE

中调用它们