解决我的消息BUG
This commit is contained in:
parent
81ee70bcad
commit
9fa59dc966
@ -1,4 +1,5 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
@ -21,8 +22,20 @@ export const columns = [
|
|||||||
title: '消息状态',
|
title: '消息状态',
|
||||||
key: 'status',
|
key: 'status',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender({ record }) {
|
render(record) {
|
||||||
return h('span', record.status === 1 ? '已读' : '未读');
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => (record.status == 1 ? '已读' : '未读'),
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user