import { h, ref } from 'vue' import { ColumnsProps } from '../../../components/table/table-helper' import { DictionaryManage } from '../../../entity/system/dictionary-manage' import { Tag } from 'ant-design-vue' const DICTIONARY_STATE_MAP = [ h( Tag, { color: 'pink' }, { default: () => '不可修改' } ), h( Tag, { color: 'green' }, { default: () => '可修改' } ), h( Tag, { color: 'red' }, { default: () => '禁用' } ) ] const columns = ref[]>([ { title: '数据字典名称', dataIndex: 'itemName' }, { title: '字典编号', dataIndex: 'itemCode' }, { title: '参数值', dataIndex: 'itemValue' }, { title: '排序', align: 'center', width: 80, dataIndex: 'sortCode' }, { title: '状态', align: 'center', dataIndex: 'state', customRender: ({ text }) => DICTIONARY_STATE_MAP[text] }, { title: '备注', dataIndex: 'memo' } ]) export default columns