import { h, ref } from 'vue' import { ColumnsProps } from '../../../components/table/table-helper' import { MessageManage } from '../../../entity/system/message-manage' import { Tag } from 'ant-design-vue' /** * 消息状态 */ const MESSAGE_STATE_MAP = [ h( Tag, { color: '#f50' }, { default: () => '不发送' } ), h( Tag, { color: '#87d068' }, { default: () => '发送' } ) ] const columns = ref[]>([ { title: '消息模板名称', dataIndex: 'templateName' }, { title: '模板key', dataIndex: 'templateCode' }, { title: '消息模板内容', dataIndex: 'templateContent' }, { title: '消息状态', dataIndex: 'sendSwitch', customRender: ({ text }) => MESSAGE_STATE_MAP[text] } ]) export default columns