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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id'
  },
  {
    label: '标题',
    prop: 'title',
  },
  {
    label: '类型',
    prop: 'type',
    render(record) {
      return h('span', record.row.type === 1 ? '通知' : '公告');
    },
  },
  {
    label: '状态',
    prop: 'status',
    render(record) {
      return h('span', record.row.status === 1 ? '正常' : '关闭')
    },
  },
  {
    label: '点击率',
    prop: 'clickNum',
  },
  {
    label: '创建人',
    prop: 'createUser',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
