import { h } from 'vue';
import { NTag } from 'naive-ui';

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