解决我的消息BUG

This commit is contained in:
zjl 2024-12-14 16:54:09 +08:00
parent 81ee70bcad
commit 9fa59dc966

View File

@ -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 ? '已读' : '未读'),
},
);
},
},
{