# 界面调整
字段(见行高亮
):
propName: {
ui: { // 块(properties)的ui配置
showBody: true, // 隐藏/打开切换按钮
toggleTexts: ["打开", "隐藏"], // 切换按钮不同状态显示的文字
type: "", // 整个块的布局类型
hasBorder: false, // 内容区是否有边框
padding: undefined, // 内容区的内边距
// 以下属性:在ui里面,是对块(properties)的补充,
// 它只会影响块(properties)里面的属性,如name;
// 对当前的块(properties)没有影响;有点类似display:flex
rowHeight: 40, // 项的行高
rowSpace: 20, // 项的行高与上一次项(行)之间的间隔
labelWidth: 100, // 项label的宽度
offsetLeft: 0, // 项的右边偏移量
offsetRight: 0, // 项的右边偏移量
colon: false, // label中是否有冒号
direction: "h" // 项的排版方向: "h" "v"
},
label: "label名称",
// 我在块properties,影响的是properties本身这一项,若没有继承上一级的ui
rowHeight: 40, // 项的行高
rowSpace: 20, // 项的行高与上一次项(行)之间的间隔
labelWidth: 100, // 项label的宽度
offsetLeft: 0, // 项的右边偏移量
offsetRight: 0, // 项的右边偏移量
colon: false, // label中是否有冒号
direction: "h" // 项的排版方向: "h" "v"
properties: {
name: {
label: "名称",
component: "el-input",
value: "天天",
// 我在组件项内,影响的是component本身这一项;若没有写则继承上一级的ui(就是第一个高亮部分)
rowHeight: 40, // 项的行高
rowSpace: 20, // 项的行高与上一次项(行)之间的间隔
labelWidth: 100, // 项label的宽度
offsetLeft: 0, // 项的右边偏移量
offsetRight: 0, // 项的右边偏移量
colon: false, // label中是否有冒号
direction: "h" // 项的排版方向: "h" "v"
}
// ... 其它项
}
}
# 实例
ui配置
ui里面的配置(rowSpace、colon等)并不影响当前properties(与ui同一级)
界面调整,只会影响当前properties(与ui同一级)
里面的属性。