ExtJS4中的手风琴布局

ExtJS4中的手风琴布局,extjs4,Extjs4,我有一个面板,其中有两个GridPanel作为项目,这是用手风琴布局设置的。 根据某些条件,我需要显示或隐藏第二个网格面板 var chartStoreGridPanel = Ext.create('Ext.Panel', { id: 'chartStoreGridPanel', height: 200, layout: 'accordion', items: [chartSt

我有一个面板,其中有两个GridPanel作为项目,这是用手风琴布局设置的。 根据某些条件,我需要显示或隐藏第二个网格面板

var chartStoreGridPanel = Ext.create('Ext.Panel', {
               id: 'chartStoreGridPanel',
               height: 200,
               layout: 'accordion',
               items: [chartStoreGridPanel1, chartStoreGridPanel2]
            });
我想根据某些条件显示或隐藏“chartGridPanel2”。

尝试以下操作:

    items: [
        chartStoreGridPanel1,
        <condition> ? chartStoreGridPanel2 : {}
    ]
项目:[
chartStoreGridPanel1,
?chartStoreGridPanel2:{}
]

手风琴中的两个网格?你确定不想使用“border”吗?@sha是的。。。我不想使用边界。。