From 173c723c7cf7eac71717a5632add5afca79c3eb9 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 05 一月 2024 18:39:32 +0800 Subject: [PATCH] fix 修复 富文本编辑器 单页面多实例图片胡乱问题 --- 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