我有一个有两个子面板的面板。我想在顶部面板上使用collapseMode: 'mini'
。功能似乎有效,但背景颜色似乎与折叠按钮一起显示。当我使用ExtJS 4时,这从来都不是问题,但升级到5似乎搞砸了。
如何才能在面板上显示背景颜色?
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [ {
xtype: 'myApp-PnlOne',
region: 'north',
header: false,
split: true,
collapsible: true,
collapseMode: 'mini',
border: false,
bodyCls: 'viewPanelBody'
},{
xtype: 'myApp-PnlOne',
region: 'center',
header: false,
layout: 'fit'
}]
});
me.callParent(arguments);
},
看起来像是什么:
答案 0 :(得分:0)
我认为我遇到了同样的问题,在我的情况下,它正在分配类" x-autocontainer-innerCt"。我用元素的自定义css类修复它。如果你给面板一个id,你就可以为"# - innerCt.x-autocontainer-innerCt"添加css代码。例如:
...
items: [ {
id: 'top-panel',
xtype: 'myApp-PnlOne',
region: 'north',
header: false,
split: true,
collapsible: true,
collapseMode: 'mini',
border: false,
bodyCls: 'viewPanelBody'
}...
css代码:
#top-panel-innerCt.x-autocontainer-innerCt
{
background-color: #FFFFFF;/*specify the background color you want here or use transparent*/
}