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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id'
  },
  {
    label: '名称',
    prop: 'name',
  },
  {
    label: '类型',
    prop: 'type',
    render(record) {
      return h('span', record.row.type === 1 ? '友情链接' : '合作伙伴')
    },
  },
  {
    label: '类型',
    prop: 'form',
    render(record) {
      return h('span', record.row.form === 1 ? '文字链接' : '图片链接')
    },
  },
  {
    label: 'URL',
    prop: 'url',
  },
  {
    label: '状态',
    prop: 'status',
    render(record) {
      return h('span', record.row.status === 1 ? '在用' : '停用')
    },
  },
  {
    label: '排序',
    prop: 'sort',
  },
  {
    label: '创建人',
    prop: 'createUser',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
