# 块布局/标题

字段(见行高亮):




 
 
 
 
 





 
 









propName: {
  ui: { // 块(properties)的ui配置
    
    showBody: true,     // 隐藏/打开切换按钮;不设置则没有切换按钮
    toggleTexts: ["打开", "隐藏"],  // 切换按钮不同状态显示的文字
    type: "",           // 整个块的布局类型;值:"bg","block","bg-block"或空值
    hasBorder: false,   // 内容区是否有边框
    padding: undefined, // 内容区的内边距;若没有设置,则根据type和hasBorder的值进行自动取值

    colon: false       // label中是否有冒号
    // ...
  },
  label: false,   // 块properties的label一般都设置为false
  title: "标题",
  properties: {
    name: {
      label: "名称",
      component: "el-input",
      value: "天天"
    }
    // ... 其它项
  }
}

# 实例

# 子属性

当properties的子属性(如name)设置为nullundefinedfalse时,说明此项是不显示的; 这样写的目的是为了提高代码的可读性。

场景:新增和编辑可能用到同一个页面,编辑时可能某些项是不需要的,但是新增是需要填写的;写法如:name: this.$route.params.id ? false : {正常的组件}

注意

propertiescomponent同时存在, component将失效。