80a3ae8d
xingyu
feat: add vue3(el...
|
1
2
3
4
|
import { reactive } from 'vue'
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { DICT_TYPE } from '@/utils/dict'
|
725cc4e4
xingyu4j
perf: vxe
|
5
6
|
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
|
e2dba57d
YunaiV
vue3:测试 client、to...
|
7
|
|
80a3ae8d
xingyu
feat: add vue3(el...
|
8
9
10
11
12
13
|
// 表单校验
export const rules = reactive({
applicationName: [required],
code: [required],
message: [required]
})
|
e2dba57d
YunaiV
vue3:测试 client、to...
|
14
|
|
80a3ae8d
xingyu
feat: add vue3(el...
|
15
|
// 新增 + 修改
|
725cc4e4
xingyu4j
perf: vxe
|
16
17
18
19
20
21
22
23
24
|
const crudSchemas = reactive<VxeCrudSchema>({
primaryKey: 'id',
primaryType: 'seq',
action: true,
columns: [
{
title: '错误码类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_ERROR_CODE_TYPE,
|
16b3e910
xingyu4j
perf: vxe
|
25
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
26
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
27
28
29
|
{
title: '应用名',
field: 'applicationName',
|
16b3e910
xingyu4j
perf: vxe
|
30
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
31
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
32
33
34
|
{
title: '错误码编码',
field: 'code',
|
16b3e910
xingyu4j
perf: vxe
|
35
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
36
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
37
38
|
{
title: '错误码错误提示',
|
4a692ed2
xingyu4j
refactor: loginlog
|
39
40
|
field: 'message',
isSearch: true
|
725cc4e4
xingyu4j
perf: vxe
|
41
42
43
44
45
|
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
|
16b3e910
xingyu4j
perf: vxe
|
46
47
|
isForm: false,
isSearch: true,
|
ac476382
xingyu4j
perf: vxe
|
48
|
search: {
|
ac476382
xingyu4j
perf: vxe
|
49
50
51
|
itemRender: {
name: 'XDataTimePicker'
}
|
725cc4e4
xingyu4j
perf: vxe
|
52
|
}
|
80a3ae8d
xingyu
feat: add vue3(el...
|
53
|
}
|
725cc4e4
xingyu4j
perf: vxe
|
54
55
56
|
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|