Element 组件对象属性用法

2020-10-19  本文已影响0人  ShoneSingLone
image.png
  <el-table-column  v-bind="bindProps" >...
  computed: {
    bindProps() {
      /* this.configs 可以动态变更,优先级高于this.$attrs */
      return merge(
        {
          headerAlign: "center",
          align: "center",
        },
        this.$attrs,
        /* configs formitem type 与 el column typ 冲突 需要剔除 */
        omit(this.configs, ["type"])
       /*
        configs:{
            label:"label",
            prop:"prop"
        }
      */
      );
    },
  },
上一篇 下一篇

猜你喜欢

热点阅读