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

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id'
  },
  {
    label: '广告位名称',
    prop: 'name',
  },
  {
    label: '广告位编号',
    prop: 'location',
  },
  {
    label: '广告位类型',
    prop: 'type',
    render(record) {
      let typeText = ''
      switch (record.row.type) {
        case 1:
          typeText='网站'
          break;
        case 2:
          typeText='手机站'
          break;
        case 3:
          typeText='移动端'
          break;
        default:
          break;
      }
      return h('span', typeText || '-');
    },
  },
  {
    label: '排序',
    prop: 'sort',
  },
  {
    label: '创建人',
    prop: 'createUser',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
