From 31da01bdd1e4fe8fb8eec41f401d73bcf6cc18b7 Mon Sep 17 00:00:00 2001 From: ahao <liuhaoai545@gmail.com> Date: 星期六, 06 一月 2024 17:27:01 +0800 Subject: [PATCH] fix https://gitee.com/dromara/RuoYi-Vue-Plus/issues/I8TMAI --- src/components/ImageUpload/index.vue | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 47945dd..ae5cd45 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -46,7 +46,10 @@ import { globalHeaders } from '@/utils/request'; const props = defineProps({ - modelValue: [String, Object, Array], + modelValue: { + type: [String, Object, Array], + default: () => [] + }, // 鍥剧墖鏁伴噺闄愬埗 limit: propTypes.number.def(5), // 澶у皬闄愬埗(MB) @@ -78,14 +81,14 @@ watch( () => props.modelValue, - async (val) => { + async (val: string) => { if (val) { // 棣栧厛灏嗗�艰浆涓烘暟缁� let list: OssVO[] = []; if (Array.isArray(val)) { list = val as OssVO[]; } else { - const res = await listByIds(val as string); + const res = await listByIds(val); list = res.data; } // 鐒跺悗灏嗘暟缁勮浆涓哄璞℃暟缁� -- Gitblit v1.9.3