wms-antdvue/.svn/pristine/3a/3a118075ab5fc4533d39c43100d616f8896c55cc.svn-base
2024-11-07 16:33:03 +08:00

75 lines
1.2 KiB
Plaintext

import { h } from 'vue';
import { Avatar, Tag } from 'ant-design-vue';
import { BasicColumn } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: 'id',
dataIndex: 'id',
width: 100,
},
{
title: '编码',
dataIndex: 'no',
width: 100,
},
{
title: '名称',
dataIndex: 'name',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 100,
customRender({ record }) {
return h(Avatar, {
size: 48,
src: record.avatar,
shape: 'square',
});
},
},
{
title: '地址',
dataIndex: 'address',
width: 150,
},
{
title: '开始日期',
dataIndex: 'beginTime',
width: 160,
},
{
title: '结束日期',
dataIndex: 'endTime',
width: 160,
},
{
title: '状态',
dataIndex: 'status',
width: 100,
render(row) {
return h(
Tag,
{
type: row.status ? 'success' : 'error',
},
{
default: () => (row.status ? '启用' : '禁用'),
},
);
},
},
{
title: '创建时间',
dataIndex: 'date',
width: 160,
},
{
title: '停留时间',
dataIndex: 'time',
width: 80,
},
];