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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id'
  },
  {
    label: '文章标题',
    prop: 'title',
    render(record) {
      return h('a', {
        href: 'http://www.baidu.com',
        target:"_blank"
      },record.row.title);
    },
  },
  {
    label: '文章分类',
    prop: 'categoryName',
  },
  // {
  //   label: '文章链接',
  //   value:'articelLink',
  //   isSlot:true,
  // },
  {
    label: '文章状态',
    prop: 'status',
    render(record) {
      return h('span', record.row.status === 1 ? '下架' : '正常')
    },
  },
  {
    label: '创建人',
    prop: 'createUser',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
