mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-07 23:55:07 +08:00
refactor: dictData ==> dictClass
This commit is contained in:
@ -17,7 +17,7 @@ export type CrudSchema = Omit<TableColumn, 'children'> & {
|
||||
detail?: CrudDescriptionsParams // 详情的详细配置
|
||||
children?: CrudSchema[]
|
||||
dictType?: string // 字典类型
|
||||
dictData?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
|
||||
dictClass?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
|
||||
}
|
||||
|
||||
type CrudSearchParams = {
|
||||
@ -157,11 +157,11 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||
let comonentProps = {}
|
||||
if (schemaItem.dictType) {
|
||||
const options: ComponentOptions[] = []
|
||||
if (schemaItem.dictData && schemaItem.dictData === 'number') {
|
||||
if (schemaItem.dictClass && schemaItem.dictClass === 'number') {
|
||||
getIntDictOptions(schemaItem.dictType).forEach((dict) => {
|
||||
options.push(dict)
|
||||
})
|
||||
} else if (schemaItem.dictData && schemaItem.dictData === 'boolean') {
|
||||
} else if (schemaItem.dictClass && schemaItem.dictClass === 'boolean') {
|
||||
getBoolDictOptions(schemaItem.dictType).forEach((dict) => {
|
||||
options.push(dict)
|
||||
})
|
||||
|
@ -38,7 +38,7 @@ type VxeCrudColumns = Omit<VxeTableColumn, 'children'> & {
|
||||
print?: CrudPrintParams // vxe 打印的字段
|
||||
children?: VxeCrudColumns[] // 子级
|
||||
dictType?: string // 字典类型
|
||||
dictData?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
|
||||
dictClass?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
|
||||
}
|
||||
|
||||
type CrudSearchParams = {
|
||||
@ -239,11 +239,11 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
|
||||
let comonentProps = {}
|
||||
if (schemaItem.dictType) {
|
||||
const options: ComponentOptions[] = []
|
||||
if (schemaItem.dictData && schemaItem.dictData === 'number') {
|
||||
if (schemaItem.dictClass && schemaItem.dictClass === 'number') {
|
||||
getIntDictOptions(schemaItem.dictType).forEach((dict) => {
|
||||
options.push(dict)
|
||||
})
|
||||
} else if (schemaItem.dictData && schemaItem.dictData === 'boolean') {
|
||||
} else if (schemaItem.dictClass && schemaItem.dictClass === 'boolean') {
|
||||
getBoolDictOptions(schemaItem.dictType).forEach((dict) => {
|
||||
options.push(dict)
|
||||
})
|
||||
|
Reference in New Issue
Block a user