<!--
 * @Descripttion:
 * @Version: 1.0
 * @Author: +C
 * @Date: 2022-02-18 09:32:43
 * @LastEditors: +C
 * @LastEditTime: 2022-05-15 21:16:32
-->
<script>
export default {
  name: `DxxTableColumn`,
  // functional: true, //函数式组件
  props: {
    field: { // v-model绑定的值
      type: String,
      required: false,
      default: () => { return null }
    }
  },
  methods: {},
  //建立虚拟 DOM
  render: function (createElement) {
    // let _this = Object.entries(this)

    //编辑：dom表单元素
    let drawFromComponents = createElement(
      // 标签名称
      `vxe-table-column`,
      // 传递数据
      {
        attrs: {
          ...this.$attrs
        },
        props: {
          ...this._props
        },
        on: {
          ...this.$listeners
        },
        scopedSlots: {
          ...this.$scopedSlots
        }
        /* ...context.data,
        props: {
          ...context.props
        },
        class: (context.data.staticClass || "") + " dxx-select", //自定义class
        style: {
          ...context.data.staticStyle
        } */
      },
      // 子节点数组，createElement...
      [
        this.$slots.default
      ]
    );

    return drawFromComponents;
  }
};
</script>

<style scoped>
</style>
