import { h } from 'vue'; export const columns = [ { title: 'ID', dataIndex: 'id', width: 100, }, { title: '数据源名称', dataIndex: 'name', }, { title: '数据库类型', dataIndex: 'dbType', customRender({ record }) { let typeText = '' switch (record.dbType) { case 1: typeText='MySQL' break; case 2: typeText='PostgreSQL' break; case 3: typeText='SQLServer' break; case 4: typeText='Oracle' break; case 5: typeText='Sqlite' break; default: break; } return h('span', typeText || '-'); }, }, { title: '数据源编码', dataIndex: 'code', }, { title: '数据库驱动类', dataIndex: 'dbDriver', }, { title: '数据源地址', dataIndex: 'dbUrl', }, { title: '数据库名称', dataIndex: 'dbName', }, { title: '数据库用户名', dataIndex: 'dbUsername', }, { title: '备注', dataIndex: 'note', }, { title: '创建人', dataIndex: 'createUser', }, { title: '创建时间', dataIndex: 'createTime', width: 180, }, { title: '操作', fixed:'right', dataIndex: 'action', key: 'action', width: 200, }, ];