React EasyUI 布局

2020-06-24 12:02 更新

布局( Layout )可视为一个容器。该容器内部可划分五个区域:北区( North ) 、南区( South ) 、东区( East ) 、西区( West )和中区( Center )。 布局( Layout )中区( Center )是必需区块,北区( North ) 、南区( South ) 、东区( East ) 、西区( West )是可选区块。 布局( Layout )可以嵌套,因此您可以凭个人意愿构建复杂多变的布局。

属性列表

名称 数据类型 作用描述 默认值
className string 布局样式类。 null
style Object 布局内联样式。 null

方法列表

名称 参数 返回值 作用描述
getPanel region layoutPanel 获取区域面板组件。

注:
- 继承: LocaleBase 。

使用方法

<Layout style={{ width: 700, height: 250 }}>
  <LayoutPanel region="north" style={{ height: 50 }}>
    <div style={titleStyle}>北区</div>
  </LayoutPanel>
  <LayoutPanel region="south" style={{ height: 50 }}>
    <div style={titleStyle}>南区</div>
  </LayoutPanel>
  <LayoutPanel region="west" style={{ width: 120 }}>
    <div style={titleStyle}>西区</div>
  </LayoutPanel>
  <LayoutPanel region="east" style={{ width: 120 }}>
    <div style={titleStyle}>东区</div>
  </LayoutPanel>
  <LayoutPanel region="center" style={{ height: '100%' }}>
    <div style={titleStyle}>中区</div>
  </LayoutPanel>
</Layout>
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号