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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id',
    fixed: 'left',
    width: 50,
  },
  {
    label: '模板名称',
    prop: 'name',
    minWidth: 150,
  },
  {
    label: '模板编码',
    prop: 'code',
    minWidth: 150,
  },
  {
    label: '文件名称',
    prop: 'fileName',
    minWidth: 150,
  },
  {
    label: '文件路径',
    prop: 'filePath',
    minWidth: 150,
    render(record) {
      return h(
        'a',
        {
          href: record.row.filePath,
          target: '_blank',
        },
        '点击查看文件',
      );
    },
  },
  {
    label: '创建人',
    prop: 'createUser',
    minWidth: 100,
  },
  {
    label: '创建时间',
    prop: 'createTime',
    width: 180,
  },
];
