fix: 修复预览无法跳转题目的问题

- 暂时将答案挂到 question 上面,后续等待接口实现再提交答案
This commit is contained in:
Huangzhe
2025-03-23 11:12:05 +08:00
parent c1e31f096b
commit b8417c92d8

View File

@@ -3,6 +3,16 @@ import FileUpload from '@/views/Design/components/Questions/FileUpload.vue';
const questionIndex = defineModel<number>('questionIndex', { default: NaN });
const answerIndex = defineModel<number>('answerIndex', { default: NaN });
const question = defineModel<question>('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);
});
</script>
<template>
<!-- 文件上传题 -->