Parcourir la source

字词卡片释义显示

natasha il y a 1 jour
Parent
commit
9e3d35ab09

+ 21 - 0
src/views/book/courseware/create/components/question/video_interaction/ExerciseAdd.vue

@@ -0,0 +1,21 @@
+<template>
+  <div class="Exercise-add">
+    <div class="main"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ExerciseAdd',
+  components: {},
+  props: [''],
+  data() {
+    return {};
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 13 - 8
src/views/book/courseware/preview/components/article/components/Wordcard.vue

@@ -425,14 +425,15 @@ export default {
         // _this.mp3Url = _this.word.detail.mp3_list[0].id;
       }
       this.word.detail.mp3Url = this.mp3Url;
-      if (_this.word.detail.definition_list && _this.word.detail.definition_list.length > 0) {
-        _this.word.detail.definition_list.forEach((item) => {
-          if (/^[\u4E00-\u9FA5]+$/.test(item)) {
-            this.defChsArr.push(item);
-          } else {
-            this.defEnArr.push(item);
-          }
-        });
+      console.log(this.word.detail);
+      if (_this.word.detail.definition_list) {
+        // _this.word.detail.definition_list.forEach((item) => {
+        if (/^[\u4E00-\u9FA5]+$/.test(_this.word.detail.definition_list)) {
+          this.defChsArr.push(_this.word.detail.definition_list);
+        } else {
+          this.defEnArr.push(_this.word.detail.definition_list);
+        }
+        // });
       }
       _this.checkCollStatus();
     },
@@ -615,6 +616,10 @@ export default {
 
     .word-en {
       font-family: 'robot';
+
+      :deep p {
+        margin: 0;
+      }
     }
   }