From cbc27d7cbf8ff71c2b38296860c74052e4ac241b Mon Sep 17 00:00:00 2001 From: Full stack grave <280684602@qq.com> Date: Wed, 13 Mar 2024 00:47:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E7=B1=BB=E5=9E=8B=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invalid prop: type check failed for prop "modelValue". Expected String with value "0", got Number with value 0 --- src/components/ma-form/formItem/form-input.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 + From 95f0b87afa9736128e679a7c07ee5af1f54f1f1b Mon Sep 17 00:00:00 2001 From: Full stack grave <280684602@qq.com> Date: Wed, 13 Mar 2024 00:50:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在上传文件类型时,编辑没有文件名称导致无法预览文件 --- src/components/ma-upload/components/file-upload.vue | 1 + 1 file changed, 1 insertion(+) 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' From 378bb020ba5fe503d5f253653946460056a2cf7c Mon Sep 17 00:00:00 2001 From: Full stack grave <280684602@qq.com> Date: Wed, 13 Mar 2024 00:52:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=84=E5=90=88?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96form?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ma-crud/components/form.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)