我正在尝试将以下选项卡添加到以下面板,位于面板的顶部和底部工具栏之间。这可能吗?您能否举例说明如何组合这两个文件?
谢谢你的帮助!
控制板:
Ext.define('Myapp.view.Product', {
extend: 'Ext.form.Panel',
id: 'productCard',
config: {
modal: true,
hideOnMaskTap: false,
centered: true,
height: '95%',
width: '98%',
items: [
{
docked: 'top',
xtype: 'toolbar',
title: '',
id: 'productTitle'
},
{
docked: 'bottom',
xtype: 'toolbar',
items: [
{
text: 'Close',
ui: 'back',
id: 'closeProductCard'
}
]
}
]
}
});
标签
Ext.define('Myapp.view.Tabs', {
extend: 'Ext.tab.Panel',
requires: [
'Ext.field.Toggle'
],
config: {
activeItem: 0,
tabBar: {
docked: 'top',
autoScroll: 'auto',
ui: 'neutral',
layout: {
pack: 'center'
}
},
items: [
{
title: 'Tab 1',
xtype: 'formpanel',
items: [
{
xtype: 'fieldset',
defaults: {
labelWidth: '35%',
labelAlign: 'top'
},
items: [
{
xtype: 'togglefield',
name: 'toggle',
label: 'Toggle'
}
]
}
]
},
{
title: 'Tab 2',
xtype: 'formpanel',
items: [
{
xtype: 'fieldset',
defaults: {
labelWidth: '35%',
labelAlign: 'top'
},
items: [
{
xtype: 'togglefield',
name: 'toggle',
label: 'Toggle'
}
]
}
]
}
]
}
});