natasha il y a 5 jours
Parent
commit
c8d0dc0cec
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 8 2
      src/views/personalCenter/components/Collect.vue

+ 8 - 2
src/views/personalCenter/components/Collect.vue

@@ -128,7 +128,8 @@
           ></svg-icon>
           <div class="word-info">
             <div class="word-info-top">
-              <b class="word" @click="showWord(itemW)">{{ itemW.word }}</b>
+              <b class="word">{{ itemW.word }}</b>
+              <!-- <b class="word" @click="showWord(itemW)">{{ itemW.word }}</b> -->
               <span class="symbol">{{ itemW.pinyin }}</span>
               <div class="para-list" v-if="itemW.explain">
                 <div
@@ -342,7 +343,7 @@
       class="login-dialog"
       v-if="wordcardShow"
     >
-      <WordCard @closeWord="closeWord" />
+      <WordCard :dataObj="activeItem" @closeWord="closeWord" />
     </el-dialog>
   </div>
 </template>
@@ -408,6 +409,7 @@ export default {
       voicePlaySrc: require("../../../assets/voice-play-red.png"),
       activeIndex: null,
       playInfo: null,
+      activeItem: null,
     };
   },
   //计算属性 类似于data概念
@@ -448,6 +450,7 @@ export default {
     },
     // 查看单词卡片
     showWord(obj) {
+      this.activeItem = obj;
       this.wordcardShow = true;
     },
     // 关闭单词卡片
@@ -489,6 +492,9 @@ export default {
           .then((res) => {
             if (res.status === 1) {
               this.wordList = res.word_list;
+              this.wordList.forEach((item) => {
+                item.collect = true;
+              });
               this.total_count = res.total_count;
             }
           })