From fc8153002b0d48e6521c6f8d200d05bc47b6d1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 21 Aug 2025 11:34:46 +0800 Subject: [PATCH] fix: bug --- src/components/examination/subject.vue | 5 +++-- src/pages/course/components/talkingItem.vue | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue index 7ed3cee2..9ba4b667 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -106,13 +106,14 @@ clearResult: { type: Boolean, default: true - } + }, }); const modelValue = computed({ get: () => props.modelValue, set: (val) => emit('update:modelValue', val) }); - const item_answer = ref(typeof props?.my_answer === 'string' ? props.my_answer.split(',') : []); + let answerText = props.item?.my_answer + const item_answer = ref(typeof answerText === 'string' ? answerText.split(',') : []); const feedback_click = () => { emit('subject_click', 'feedback', props.item); }; diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 7909e506..4b23e9f1 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -293,7 +293,8 @@ const audioCacheObj = computed(() => storageStore.audioObj) const subjectInfo = computed(()=>{ return { ...dataInfo.value, - ...(dataInfo.value?.traQnsInfoVo||{}) + ...(dataInfo.value?.traQnsInfoVo||{}), + my_answer: dataInfo.value?.traQnsInfoVo?.anserResult||'' } }) const mode = ref('study') // 考试 examination 练习practice 学习study