BhtLayoutContainer

文档版本:1.0.0

描述

布局容器组件,用于按行列划分区域并承载其他组件。

效果

BhtLayoutContainer 效果图

示例

<bht-layout-container></bht-layout-container>

代码

<bht-layout-container :ref="item.id" :item="item"></bht-layout-container>

或者

<BhtLayoutContainer :ref="item.id" :item="item"></BhtLayoutContainer>

参数

参数类型必填默认值说明
itemObject-组件配置信息。
configOnlyBooleanfalse-

配置项

item.config.data 支持的常用字段如下:

key名称类型默认值说明
rows行数string2请输入行数
columns列数string2请输入列数
gap间距string12px例如 12px
columnWidths列宽string-逗号分隔,例如 1fr, 320px, 25%
rowHeights行高string-逗号分隔,例如 auto, 240px, 30vh
margin外边距string0例如 0、16px、12px 0
padding内边距string16px例如 16px
minHeight最小高度string160px例如 160px
height固定高度string-可选,例如 480px
cellMinHeight单元最小高度string120px例如 120px
cellPadding单元内边距string10px例如 10px
backgroundColor背景颜色color#ffffff请选择背景颜色
borderColor边框颜色color#e5e7eb请选择边框颜色
borderWidth边框宽度string1px例如 1px
borderStyle边框样式stringsolid请选择边框样式
cellBackgroundColor单元背景色color#f8fafc请选择单元背景色
cellBorderColor单元边框色color#cbd5e1请选择单元边框色
cellBorderStyle单元边框stringdashed请选择单元边框
cellBorderRadius单元圆角string6px例如 6px
alignItems垂直对齐stringstretch请选择垂直对齐
justifyItems水平对齐stringstretch请选择水平对齐
cellOverflow内容溢出stringvisible请选择内容溢出
borderRadius圆角string8px例如 8px
boxShadow阴影stringnone例如 0 12px 24px rgba(15,23,42,.08)
opacity透明度string10 到 1,例如 0.95
boxSizing盒模型stringborder-box请选择盒模型
customStyle自定义样式string-例如 box-shadow: none;
cellCustomStyle单元自定义样式string-例如 place-items: center;

引入

import { BhtLayoutContainer } from '@behappyto/cms-ui-vue3'