/*
 * @Author: wjc
 * @Date: 2021-09-15 17:46:28
 * @LastEditors: wjc
 * @LastEditTime: 2021-09-23 16:07:46
 * @Description: wisdom ui 组件
 */

export const wFormComponents = [
  {
    // 组件的自定义配置
    __config__: {
      label: '单行文本',
      labelWidth: null,
      showLabel: true,
      changeTag: true,
      tag: 'el-input',
      tagIcon: 'input',
      defaultValue: undefined,
      required: true,
      layout: 'colFormItem',
      span: 24,
      // 正则校验规则
      regList: []
    },
    // 组件的插槽属性
    __slot__: {
      prepend: '',
      append: ''
    },
    // 其余的为可直接写在组件标签上的属性
    placeholder: '请输入',
    style: { width: '100%' },
    clearable: true,
    'prefix-icon': '',
    'suffix-icon': '',
    maxlength: null,
    'show-word-limit': false,
    readonly: false,
    disabled: false
  }
]

export const wLayoutComponents = [
  {
    // 组件的自定义配置
    __config__: {
      label: '页头',
      tag: 'w-header',
      tagIcon: 'wheader',
      layout: 'raw',
      span: 24
    },
    // 组件的插槽属性
    __slot__: {
      right: ''
    },
    // 其余的为可直接写在组件标签上的属性
    desc: '描述文字', // 描述
    back: () => {}
  },
  {
    // 组件的自定义配置
    __config__: {
      label: '表单容器',
      tag: 'el-form',
      tagIcon: 'row',
      layout: 'form',
      span: 24,
      layoutTree: true
    },
    // 其余的为可直接写在组件标签上的属性
    class: 'form-container',
    size: '',
    inline: true,
    labelWidth: '',
    type: 'default'
  },
  {
    __config__: {
      layout: 'raw',
      tagIcon: 'table',
      tag: 'w-table',
      document: 'https://element.eleme.cn/#/zh-CN/component/table',
      span: 24,
      formId: 101,
      renderKey: 1595761764203,
      componentName: 'row101',
      showLabel: true,
      changeTag: true,
      labelWidth: null,
      label: '表格',
      dataType: 'static',
      // method: 'get',
      // dataPath: 'list',
      // dataConsumer: 'data',
      // url: 'https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/tableData',
      children: [{
        __config__: {
          layout: 'raw',
          tag: 'el-table-column',
          renderKey: 15957617660153
        },
        prop: 'date',
        label: '日期'
      }, {
        __config__: {
          layout: 'raw',
          tag: 'el-table-column',
          renderKey: 15957617660152
        },
        prop: 'address',
        label: '地址'
      }, {
        __config__: {
          layout: 'raw',
          tag: 'el-table-column',
          renderKey: 15957617660151
        },
        prop: 'name',
        label: '名称'
      }, {
        __config__: {
          layout: 'raw',
          tag: 'el-table-column',
          renderKey: 1595774496335,
          children: [
            {
              __config__: {
                label: '按钮',
                tag: 'el-button',
                tagIcon: 'button',
                layout: 'raw',
                renderKey: 1595779809901
              },
              __slot__: {
                default: '主要按钮'
              },
              type: 'primary',
              icon: 'el-icon-search',
              round: false,
              size: 'medium'
            }
          ]
        },
        label: '操作'
      }]
    },
    data: {
      list: [],
      pageSize: 20,
      pageNum: 1,
      total: 0
    },
    directives: [{
      name: 'loading',
      value: false
    }],
    border: true,
    type: 'default',
    justify: 'start',
    align: 'top'
  }
]
