diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 6895440b..bba466a7 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -144,6 +144,8 @@ watch( } else if (isArray(props.modelValue)) { // 情况2:字符串 files.concat(props.modelValue) + } else if (props.modelValue === undefined) { + // 情况3:undefined 不处理 } else { throw new Error('不支持的 modelValue 类型') } diff --git a/src/views/infra/demo02/DemoStudentContactForm.vue b/src/views/infra/demo02/DemoStudentContactForm.vue index 50c44263..694aadac 100644 --- a/src/views/infra/demo02/DemoStudentContactForm.vue +++ b/src/views/infra/demo02/DemoStudentContactForm.vue @@ -9,20 +9,73 @@ > - + - + + + + + + + + + + + + + + + + + + +