From 3f025fbb9b0593b7526438ac470310fd192bbd35 Mon Sep 17 00:00:00 2001 From: "HTEWJ\\26070045" <2815434552@qq.com> Date: Mon, 26 Oct 2026 19:40:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(feedback):=20=E4=BF=AE=E5=A4=8D=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=BC=A0=E5=90=8E=E5=93=8D=E5=BA=94=E5=BC=8F?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E5=AF=BC=E8=87=B4=E6=8F=90=E4=BA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=B0=B8=E4=B9=85=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/shared/components/GeneralFeedbackDialog.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/shared/components/GeneralFeedbackDialog.vue b/frontend/src/shared/components/GeneralFeedbackDialog.vue index dcb25a87..11685830 100644 --- a/frontend/src/shared/components/GeneralFeedbackDialog.vue +++ b/frontend/src/shared/components/GeneralFeedbackDialog.vue @@ -13,7 +13,7 @@ * 成功提示由父组件处理。类型/模块提交的是当前语言的展示文案(后端按 ≤32 字符字符串存储)。 */ -import { computed, ref, watch } from 'vue'; +import { computed, reactive, ref, watch } from 'vue'; import { useI18n } from 'vue-i18n'; import { Loader2, Plus, X } from 'lucide-vue-next'; import { @@ -125,13 +125,16 @@ async function addImages(files: File[]): Promise { ElMessage.error(t('feedback.upload.maxSize', { size: MAX_FEEDBACK_IMAGE_SIZE_MB })); continue; } - // [STEP 4] 入队即占位(缩略图立即可见,uploading 态加遮罩),上传成功后才计入提交 - const item: PendingImage = { + // [STEP 4] 入队即占位(缩略图立即可见,uploading 态加遮罩),上传成功后才计入提交。 + // 必须用 reactive 包装后再入队:uploadFileAsset 的 await 之后对 item 的 assetNo/status 写入 + // 若发生在原始对象上,不经过数组内代理、不触发依赖更新,hasUploadingImage 的 computed + // 缓存永不失效 → 遮罩不消失且 canSubmit 永久为 false(提交按钮永远禁用)。 + const item = reactive({ assetNo: null, status: 'uploading', previewUrl: URL.createObjectURL(file), filename: file.name, - }; + }); images.value.push(item); try { const asset = await uploadFileAsset(file);