我正在尝试创建一个显示 2 个面板的 hbox。它工作正常,直到我决定将左侧面板的布局设置为“CARD”。我使用的代码是
Ext.define("InfoImage.view.WorkItems", {
layout:'hbox',
extend:'Ext.Container',
requires:[
'Ext.TitleBar',
'Ext.layout.HBox',
'Ext.List'
],
xtype:'workitems',
id:'workitems',
// layout:'fit',
config:{
//scrollable:'true',
fullscreen:true,
layout:'fit',
cls:'hboxpanel',
items:[
{
xtype:'leftPanel'
},
{
xtype:'documentPanel'
}
]
}
});
左侧面板代码如下:
Ext.define('InfoImage.view.leftPanel', {
extend:'Ext.Panel',
requires:[
'InfoImage.view.Main',
'InfoImage.view.WorkItems',
'Ext.TitleBar'
],
id:'leftPanel',
xtype:'leftPanel',
config:{
width:'30%',
fullscreen:true,
autoScroll:true,
layout:'card',
cardSwitchAnimation:'slide',
cls:'leftPanel',
items:[
/*{
xtype:'workItemPanel'
},
{
xtype:'inboxQueuePanel'
},*/
{
xtype:'toolbar',
docked:'bottom',
items:[
{
xtype:'button',
cls:'workitem',
text:"<img src='resources/images/compose.png' style='width:40px;height:40px;' />",
iconMask:true,
ui:'normal',
id:'workitem',
handler:function () {
}
},
{
xtype:'button',
cls:'inbox',
text:"<img src='resources/images/mail.png' style='width:40px;height:40px;' />",
iconMask:true,
ui:'normal',
id:'inbox',
handler:function () {
}
},
{
xtype:'button',
cls:'filecabinet',
text:"<img src='resources/images/cabinet_256.jpg' style='width:40px;height:40px;' />",
iconMask:true,
ui:'normal',
id:'filecabinet',
handler:function () {
}
}
]
}
]
}
});
我的问题是,当我运行项目时,只显示右侧面板。如何解决 leftPanel 问题?