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

export const columns = [
  {
    label: 'ID',
    prop: 'id',
    fixed: 'left',
    width: 50,
  },
  {
    label: '文章标题',
    prop: 'title',
    minWidth: 250,
  },
  {
    label: '文章分类',
    prop: 'categoryName',
    minWidth: 100,
  },
  {
    label: '文章状态',
    prop: 'status',
    minWidth: 100,
    render(record) {
      return h('span', record.row.status === 1 ? '下架' : '正常');
    },
  },
  {
    label: '创建人',
    prop: 'createUser',
    minWidth: 100,
  },
  {
    label: '创建时间',
    prop: 'createTime',
    minWidth: 180,
  },
];
