javascript - 如何在一个标签Ext.tab.Panel 中输出两个Ext.grid.Panel。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
}
]
});
解决方案
您必须将网格放入项目中并从xtype
属性中调用它们:FIDDLE