diff --git a/app/components/TooltipCom.vue b/app/components/TooltipCom.vue new file mode 100644 index 0000000..daea2eb --- /dev/null +++ b/app/components/TooltipCom.vue @@ -0,0 +1,61 @@ + + + diff --git a/app/components/dashboard/QaRecordDetail.vue b/app/components/dashboard/QaRecordDetail.vue index a5a1c03..a497bbd 100644 --- a/app/components/dashboard/QaRecordDetail.vue +++ b/app/components/dashboard/QaRecordDetail.vue @@ -10,6 +10,7 @@ import { DialogTitle } from "@/components/ui/dialog"; import { useAnswerStore } from "@/stores/answer"; +import { getOptionLines } from "@/utils"; const answerStore = useAnswerStore(); const { selectedRecord } = storeToRefs(answerStore); @@ -26,6 +27,15 @@ const dialogOpen = computed({ if (!open) close(); } }); + +/** 格式化后按行拆分选项,标记每行是否为正确答案 */ +const formattedOptionLines = computed(() => { + if (!selectedRecord.value?.options) return null; + return getOptionLines( + selectedRecord.value.options, + selectedRecord.value.answer ?? "" + ); +});