重庆熊猫 Loading

ExtJS 布局-Center布局(Center layout)

更新记录:
2022年6月12日 检查发布。
2022年6月1日 开始。

ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html
转载请注明出处:https://www.cnblogs.com/cqpanda/p/16333086.html

1.说明

center布局将子组件放置在容器最中间。

2.设置布局方法

在父容器中设置

layout: 'center',

//或者

layout: {
    type: 'center'
}

3.适合场景

将子组件放置在容器中。

4.实例

4.1实例:中心布局

image
代码:

{
    xtype: 'panel',
    title: 'Center Layout Example',
    layout: 'center',
    renderTo: document.body,
    width: 1000,
    height: 1000,
    items: [
        {
            draggable: true,
            closable: true,
            collapsible: true,
            constrain: true,
            minHeight: 100,
            title: 'Centered Content Panel',
            width: '75%', // 75% of the container width
            html: 'Some content'
        }
    ]
}
posted @ 2022-06-12 19:41  重庆熊猫  阅读(176)  评论(0编辑  收藏  举报