diff --git a/src/components/ma-crud/components/form.vue b/src/components/ma-crud/components/form.vue index 7f8237c2..1ef28c5e 100644 --- a/src/components/ma-crud/components/form.vue +++ b/src/components/ma-crud/components/form.vue @@ -192,7 +192,13 @@ const init = () => { const layout = JSON.parse(JSON.stringify(options?.formOption?.layout ?? [])) columns.value.map(async item => { - await columnItemHandle(item) + if (item.children && item.children.length > 0){ + await item.children.map(async (childItem) => { + await columnItemHandle(childItem) + }) + }else { + await columnItemHandle(item) + } }) // 设置表单布局 settingFormLayout(layout) diff --git a/src/components/ma-form/formItem/form-input.vue b/src/components/ma-form/formItem/form-input.vue index 897acc89..2e75f440 100644 --- a/src/components/ma-form/formItem/form-input.vue +++ b/src/components/ma-form/formItem/form-input.vue @@ -72,7 +72,12 @@ const getColumnService= inject('getColumnService') const columns = inject('columns') const rv = async (ev, value = undefined) => await runEvent(props.component, ev, { formModel, getColumnService, columns }, value) const index = props.customField ?? props.component.dataIndex -const value = ref(get(formModel.value, index)) +//后端传入数字类型导致报错 Invalid prop: type check failed for prop "modelValue". Expected String with value "0", got Number with value 0 +const toVal = ref(`${get(formModel.value, index)}`); +const value = ref() +if (toVal.value != 'undefined'){ + value.value = toVal.value +} watch( () => get(formModel.value, index), vl => value.value = vl ) watch( () => value.value, v => { @@ -94,4 +99,4 @@ const getComponentName = () => { rv('onCreated') onMounted(() => rv('onMounted')) - \ No newline at end of file + diff --git a/src/components/ma-upload/components/file-upload.vue b/src/components/ma-upload/components/file-upload.vue index 683c2f29..d55dca7e 100644 --- a/src/components/ma-upload/components/file-upload.vue +++ b/src/components/ma-upload/components/file-upload.vue @@ -179,6 +179,7 @@ const init = async() => { const result = await getFileUrl(config.returnType, props.modelValue, storageMode) signFile.value = result.url currentItem.value.url = result.url + currentItem.value.name = result.origin_name } currentItem.value.percent = 100 currentItem.value.status = 'complete'