From b625971befab99d7ad2eaa0f6ad38751650f9976 Mon Sep 17 00:00:00 2001 From: 21120447 Date: Wed, 26 Jun 2024 22:13:28 +0700 Subject: [PATCH] feat: see detailed answer --- src/components/DoExercise/Question.vue | 43 ++++++++++++++++++++++++-- src/components/DoExercise/Results.vue | 3 +- src/views/DoExercisePage.vue | 15 ++++++++- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/src/components/DoExercise/Question.vue b/src/components/DoExercise/Question.vue index f3fba6f..3263c97 100644 --- a/src/components/DoExercise/Question.vue +++ b/src/components/DoExercise/Question.vue @@ -1,6 +1,5 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/components/DoExercise/Results.vue b/src/components/DoExercise/Results.vue index 9eb5136..a89cfc1 100644 --- a/src/components/DoExercise/Results.vue +++ b/src/components/DoExercise/Results.vue @@ -43,6 +43,7 @@ import Quote from "@/components/DoExercise/Quote.vue"; import router from "@/router"; + const emit = defineEmits(["change-show-results"]); const props = defineProps({ slug: { type: String, @@ -67,7 +68,7 @@ } function handleShowResults() { - alert("This feature will show the results and implement later"); + emit("change-show-results"); } \ No newline at end of file diff --git a/src/views/DoExercisePage.vue b/src/views/DoExercisePage.vue index 22f677c..1ccfb7f 100644 --- a/src/views/DoExercisePage.vue +++ b/src/views/DoExercisePage.vue @@ -20,16 +20,25 @@ :question-idx="questionIdx" :warning="q.warning==false||!isFirstSubmit?false:true" @update-answer="handleUpdateAnswer" + :result="resultsData.value?.exam?.pages[pageIdx]?.questions[questionIdx]||null" />
- + + + Làm các đề khác +
@@ -37,6 +46,7 @@ @@ -106,6 +116,9 @@ loadingStore.changeLoadingState(false); resultsData.value = data; + + console.log(resultsData.value); + isShowResults.value = true; toast.success("Nộp bài thành công", { toastStyle: {