feat: 字典标签 自定义颜色

This commit is contained in:
xingyu
2023-01-16 17:54:20 +08:00
parent cccf8d8197
commit 6e49b19952
5 changed files with 39 additions and 25 deletions

View File

@ -7,7 +7,7 @@ import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n()
// 表单校验
export const dictDataRules = reactive({
title: [required],
label: [required],
value: [required],
sort: [required]
})
@ -35,7 +35,7 @@ export const crudSchemas = reactive<VxeCrudSchema>({
field: 'value'
},
{
title: '颜色类型',
title: '标签类型',
field: 'colorType',
form: {
component: 'Select',
@ -67,9 +67,12 @@ export const crudSchemas = reactive<VxeCrudSchema>({
isTable: false
},
{
title: 'CSS Class',
title: '颜色',
field: 'cssClass',
isTable: false
isTable: false,
form: {
component: 'ColorPicker'
}
},
{
title: '显示排序',

View File

@ -7,7 +7,8 @@ const { t } = useI18n() // 国际化
// 表单校验
export const dictTypeRules = reactive({
name: [required]
name: [required],
type: [required]
})
// 新增 + 修改
const crudSchemas = reactive<VxeCrudSchema>({
@ -41,9 +42,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'createTime',
formatter: 'formatDate',
isForm: false,
table: {
width: 150
},
isTable: false,
search: {
show: true,
itemRender: {