【问题标题】:Extjs panel resize issueExtjs面板调整大小问题
【发布时间】:2023-03-17 02:37:01
【问题描述】:

我的页面使用中心区域和东部区域的边框布局,中心区域有三个面板作为子面板,其中两个面板是可折叠的。当我折叠东部区域时,中心区域子面板不会调整大小。

Ext.require(['*']);
Ext.onReady(function() {


Ext.create('Ext.Viewport', {
    layout: {
        type: 'border',
        padding: 5
    },
    defaults: {
        split: true
    },
    items: [{
        region: 'center',
        border: false,
        items: [{
            html: '<h3>some text...</h3>',
        },{
            height: 100,
            split: false,
            collapsible: true,
            style : {
                marginTop:'20px'
            },
            title: 'panel 1',
            html: 'center panel 1'
        },{
            height: 100,
            split: false,
            collapsible: true,
            style : {
                marginTop:'20px'
            },
            title: 'panel 2',
            html: 'center panel 2'
        }]
    },{
        region: 'east',
        collapsible: true,
        split: true,
        width: 200,
        title: 'East'
    }]
});

需要什么才能使面板根据中心区域调整大小?谁能帮帮我?

【问题讨论】:

    标签: extjs extjs4


    【解决方案1】:

    您的代码实际上几乎对我有用。但我建议你为你的中心容器指定一个布局。默认的“自动”布局并不是特别聪明。我建议你使用“锚”:

    items: [{
        region: 'center',
        layout: 'anchor',
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-18
      • 2013-08-07
      • 1970-01-01
      • 1970-01-01
      • 2012-08-29
      • 1970-01-01
      • 2014-06-10
      • 2013-08-07
      相关资源
      最近更新 更多