You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
877 B
TypeScript
44 lines
877 B
TypeScript
import { BasicColumn, FormSchema } from '@/components/Table';
|
|
import { h } from 'vue';
|
|
import { Tag } from 'ant-design-vue';
|
|
import Icon from '@/components/Icon/Icon.vue';
|
|
|
|
export const columns: BasicColumn[] = [
|
|
{
|
|
title: '按钮名称',
|
|
dataIndex: 'name',
|
|
},
|
|
{
|
|
title: 'DOMID',
|
|
dataIndex: 'domId',
|
|
},
|
|
{
|
|
title: '排序',
|
|
dataIndex: 'sort',
|
|
},
|
|
{
|
|
title: '样式',
|
|
dataIndex: 'class',
|
|
},
|
|
{
|
|
title: '状态',
|
|
dataIndex: 'enabledMark',
|
|
width: 80,
|
|
customRender: ({ record }) => {
|
|
const color = record.status == 1 ? 'blue' : 'red';
|
|
const text = record.status == 1 ? '启用' : '停用';
|
|
return h(Tag, { color: color }, () => text);
|
|
},
|
|
},
|
|
];
|
|
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
field: 'key',
|
|
label: '关键字',
|
|
component: 'Input',
|
|
colProps: { span: 8 },
|
|
},
|
|
];
|