wms-antdvue/.svn/pristine/38/38da8279c846b2a4598cf2f611f222d19cb655f7.svn-base
2024-11-07 16:33:03 +08:00

60 lines
1.0 KiB
Plaintext

import { h } from 'vue';
import { Tag } from 'ant-design-vue';
export const columns = [
{
title: '标题',
dataIndex: 'title',
width: 300,
},
{
title: '类型',
dataIndex: 'type',
customRender({ record }) {
return h(
Tag,
{
color: record.type ==1 ? 'processing' : 'success',
},
{
default: () => (record.type ==1 ? '通知' : '公告'),
},
);
},
},
{
title: '状态',
dataIndex: 'status',
customRender({ record }) {
return h(
Tag,
{
color: record.status ==1 ? 'success' : 'error',
},
{
default: () => (record.status ==1 ? '正常' : '禁用'),
},
);
},
},
{
title: '点击率',
dataIndex: 'clickNum',
},
{
title: '创建人',
dataIndex: 'createUser',
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
},
{ title: '操作',
width:200,
fixed: 'right',
key: 'action',
dataIndex:'action'
},
];