Merge pull request 'fix:判断没有学生回答题目的情况;' (#346) from yangws into main

Reviewed-on: #346
This commit is contained in:
yangws 2024-10-20 15:25:37 +08:00
commit 54d4896e18
1 changed files with 1 additions and 0 deletions

View File

@ -218,6 +218,7 @@ const initData = () => {
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers } return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers }
}) })
console.log('获取数据: ', data) console.log('获取数据: ', data)
if (data.length === 0) return
stuHasAnswers.value = [...data[0].hasAnswers] stuHasAnswers.value = [...data[0].hasAnswers]
provide('hasAnswer', stuHasAnswers.value) provide('hasAnswer', stuHasAnswers.value)
} }