diff --git a/src/views/dashboard/message/columns.ts b/src/views/dashboard/message/columns.ts index 1a85987..5a8e84c 100644 --- a/src/views/dashboard/message/columns.ts +++ b/src/views/dashboard/message/columns.ts @@ -1,4 +1,5 @@ import { h } from 'vue'; +import { NTag } from 'naive-ui'; export const columns = [ { @@ -21,8 +22,20 @@ export const columns = [ title: '消息状态', key: 'status', width: 100, - customRender({ record }) { - return h('span', record.status === 1 ? '已读' : '未读'); + render(record) { + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: record.status == 1 ? 'success' : 'error', + }, + { + default: () => (record.status == 1 ? '已读' : '未读'), + }, + ); }, }, {