import { h } from 'vue';
import { ElTag } from 'element-plus';

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id'
  },
  {
    label: '模板名称',
    prop: 'title',
  },
  {
    label: '模板编码',
    prop: 'code',
  },
  {
    label: '模板类型',
    prop: 'type',
    render(record) {
      let typeText = ''
      switch (record.row.type) {
        case 1:
          typeText='普通邮件'
          break;
        case 2:
          typeText='图文邮件'
          break;
        case 3:
          typeText='模板文件'
          break;
        default:
          break;
      }
      return h('span', typeText || '-');
    },
  },
  {
    label: '创建人',
    prop: 'createUser',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
