From b8417c92d87422bf77801cf2f80cb3f4199d355d Mon Sep 17 00:00:00 2001 From: Huangzhe Date: Sun, 23 Mar 2025 11:12:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=B7=B3=E8=BD=AC=E9=A2=98=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 暂时将答案挂到 question 上面,后续等待接口实现再提交答案 --- .../Preview/components/questions/PreviewFileUpload.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/Survey/views/Preview/components/questions/PreviewFileUpload.vue b/src/views/Survey/views/Preview/components/questions/PreviewFileUpload.vue index a39908c..6aaba63 100644 --- a/src/views/Survey/views/Preview/components/questions/PreviewFileUpload.vue +++ b/src/views/Survey/views/Preview/components/questions/PreviewFileUpload.vue @@ -3,6 +3,16 @@ import FileUpload from '@/views/Design/components/Questions/FileUpload.vue'; const questionIndex = defineModel('questionIndex', { default: NaN }); const answerIndex = defineModel('answerIndex', { default: NaN }); const question = defineModel('question', { default: () => {} }); +import { answer } from '@/views/Design/components/Questions/hooks/useFileUploadHooks'; +import { watch } from 'vue'; + +const emit = defineEmits(['changeAnswer']); +watch(answer, () => { + // 暂时先将答案挂到 question,后续需要优化 + question.value.answer = answer.value; + // emit('changeAnswer', answer.value); + // console.log(`question`, question.value); +});