From 82eceb0c9a6fa225aca43ed3edec1b25da9e1063 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 06 六月 2024 18:48:50 +0800
Subject: [PATCH] 舞蹈优化

---
 src/components/examinations/index.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/components/examinations/index.vue b/src/components/examinations/index.vue
index 0087def..9e462e0 100644
--- a/src/components/examinations/index.vue
+++ b/src/components/examinations/index.vue
@@ -426,7 +426,6 @@
   props: {
     cardList: {
       type: Array,
-      default: [],
     },
     primaryColor: {
       type: String,
@@ -446,7 +445,13 @@
       cardData:[]
     };
   },
-  inject:['changeQuestionData'],
+  watch:{
+    cardList:{
+      handler(newVal) {
+        console.log('11',newVal);
+      }
+    }
+  },
   mounted() {
     this.cardData = this.cardList
     console.log('this.cardList',this.cardList);
@@ -568,13 +573,13 @@
     },
     // 淇濆瓨鎸夐挳
     saveAnswer() {
-      const element = document.getElementsByClassName("examination")[0];
+      const element = (this.container ? this.container : document
+      ).querySelector(".examination");
       if (element) {
         const pageNum = this.getParentWithClass(
           element,
           "page-box"
         ).getAttribute("page");
-        console.log(this.config.activeBook.name, pageNum);
         const oldAnswerData = localStorage.getItem(
           this.config.activeBook.name + "oldAnswerData"
         );

--
Gitblit v1.9.1