mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-10 00:55:07 +08:00
fix: form inputnumber
This commit is contained in:
@ -227,9 +227,13 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
|
||||
if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) {
|
||||
// 默认为 input
|
||||
let component = schemaItem?.form?.component || 'Input'
|
||||
const options: ComponentOptions[] = []
|
||||
let defaultValue: any = ''
|
||||
if (component === 'InputNumber') {
|
||||
defaultValue = 0
|
||||
}
|
||||
let comonentProps = {}
|
||||
if (schemaItem.dictType) {
|
||||
const options: ComponentOptions[] = []
|
||||
if (schemaItem.dictData && schemaItem.dictData === 'number') {
|
||||
getIntDictOptions(schemaItem.dictType).forEach((dict) => {
|
||||
options.push(dict)
|
||||
@ -253,7 +257,8 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
|
||||
field: schemaItem.field,
|
||||
label: schemaItem.form?.label || schemaItem.title,
|
||||
component: component,
|
||||
componentProps: comonentProps
|
||||
componentProps: comonentProps,
|
||||
value: defaultValue
|
||||
}
|
||||
|
||||
formSchema.push(formSchemaItem)
|
||||
|
Reference in New Issue
Block a user