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); +});