wms-antdvue/.svn/pristine/23/237e6885881f348363e092aafac48ef3931c4b49.svn-base
2024-11-07 16:33:03 +08:00

85 lines
1.5 KiB
Plaintext

import { h } from 'vue';
import { Tag } from 'ant-design-vue';
export const columns = [
{
title: '菜单名称',
dataIndex: 'name',
key: 'name',
},
{
title: '类型',
dataIndex: 'type',
key: 'type',
customRender({ record }) {
return h(
Tag,
{
color: record.type ==1 ? 'success' : 'processing',
},
{
default: () => (record.type ==1 ? '按钮' : '菜单'),
},
);
},
},
{
title: '图标',
dataIndex: 'icon2',
key: 'icon2',
},
{
title: '权限标识',
dataIndex: 'permission',
key: 'permission',
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
customRender(row) {
return h(
Tag,
{
color: row.record.status ==0 ? 'processing' : 'error',
},
{
default: () => (row.record.status ==0 ? '正常' : '停用'),
},
);
},
},
{
title: '是否隐藏',
dataIndex: 'type',
key: 'type',
customRender({ record }) {
return h(
Tag,
{
color: record.hide ==0 ? 'success' : 'error',
},
{
default: () => (record.hide ==0 ? '显示' : '隐藏'),
},
);
},
},
{
title: '排序',
dataIndex: 'sort',
key: 'sort',
},
{
title: '更新时间',
dataIndex: 'updateTime',
key: 'updateTime',
},
{ title: '操作',
width:200,
fixed: 'right',
key: 'action',
dataIndex:'action'
},
];