import { h } from 'vue'; import { ElTag } from 'element-plus'; export const columns = [ { title: 'ID', dataIndex: 'id', width: 100, }, { title: '广告位名称', dataIndex: 'name', }, { title: '广告位编号', dataIndex: 'location', }, { title: '广告位类型', dataIndex: 'type', customRender({ record }) { let typeText = '' switch (record.type) { case 1: typeText='网站' break; case 2: typeText='手机站' break; case 3: typeText='移动端' break; default: break; } return h('span', typeText || '-'); }, }, { title: '排序', dataIndex: 'sort', }, { title: '创建人', dataIndex: 'createUser', }, { title: '创建时间', dataIndex: 'createTime', width: 180, }, { title: '操作', fixed:'right', dataIndex: 'action', key: 'action', width: 200, }, ];