import { h } from 'vue'; export const columns = [ { title:'ID', dataIndex: 'id', }, { title: '模板编号', dataIndex: 'number', }, { title: '模板名称', dataIndex: 'title', }, { title: '模板编码', dataIndex: 'code', }, { 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: 'content', width: 350, }, { title: '创建人', dataIndex: 'createUser', }, { title: '创建时间', dataIndex: 'createTime', width:200, }, { title: '操作', fixed:'right', dataIndex: 'action', key: 'action', width: 200, }, ];