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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id',
    fixed: 'left',
    width: 50,
  },
  {
    label: '消息标题',
    prop: 'title',
    width: 250,
  },
  {
    label: '消息状态',
    prop: 'status',
    width: 100,
    render(record) {
      return h('span', record.row.status === 1 ? '已读' : '未读');
    },
  },
  {
    label: '创建人',
    prop: 'createUser',
    width: 100,
  },
  {
    label: '创建时间',
    prop: 'createTime',
    width: 180,
  },
];
