config.data.ts
868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { BasicColumn, FormSchema } from '/@/components/Table';
import { transformTime } from '/@/hooks/web/useDateToLocaleString';
export const columns: BasicColumn[] = [
{
title: '创建时间',
dataIndex: 'createdTime',
width: 200,
format: (_text: string, record: Recordable) => {
return transformTime(record.createdTime);
},
},
{
title: '名称',
dataIndex: 'name',
width: 200,
},
{
title: '是否跟链',
dataIndex: 'root',
slots: {
customRender: 'root',
},
width: 200,
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'textSearch',
label: '名称',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '请输入名称',
},
},
];
export const encode = (string: string) => {
return encodeURIComponent(string);
};