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,
|
6291a3d7
xingyu
refactor: dictDat...
|
25
|
dictClass: 'number',
|
16b3e910
xingyu4j
perf: vxe
|
26
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
27
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
28
29
30
|
{
title: '应用名',
field: 'applicationName',
|
16b3e910
xingyu4j
perf: vxe
|
31
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
32
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
33
34
35
|
{
title: '错误码编码',
field: 'code',
|
16b3e910
xingyu4j
perf: vxe
|
36
|
isSearch: true
|
80a3ae8d
xingyu
feat: add vue3(el...
|
37
|
},
|
725cc4e4
xingyu4j
perf: vxe
|
38
39
|
{
title: '错误码错误提示',
|
4a692ed2
xingyu4j
refactor: loginlog
|
40
41
|
field: 'message',
isSearch: true
|
725cc4e4
xingyu4j
perf: vxe
|
42
43
44
45
46
|
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
|
16b3e910
xingyu4j
perf: vxe
|
47
|
isForm: false,
|
ac476382
xingyu4j
perf: vxe
|
48
|
search: {
|
fd4bc8cc
xingyu4j
refactor: vxe
|
49
|
show: true,
|
ac476382
xingyu4j
perf: vxe
|
50
51
52
|
itemRender: {
name: 'XDataTimePicker'
}
|
725cc4e4
xingyu4j
perf: vxe
|
53
|
}
|
80a3ae8d
xingyu
feat: add vue3(el...
|
54
|
}
|
725cc4e4
xingyu4j
perf: vxe
|
55
56
57
|
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|