natasha 3 år sedan
förälder
incheckning
4fab7bb06a
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 1 1
      package.json
  2. 3 1
      src/components/common/Soundrecord.vue

+ 1 - 1
package.json

@@ -17,7 +17,7 @@
     "@tinymce/tinymce-vue": "^3.2.8",
     "awe-dnd": "^0.3.4",
     "axios": "0.18.1",
-    "book-ui": "file:../GCLS-Book-question-ui/book-ui-0.3.0.tgz",
+    "book-ui": "file:../GCLS-Book-question-ui/book-ui-0.3.1.tgz",
     "cnchar": "^3.0.1",
     "cnchar-all": "^3.0.1",
     "cnchar-order": "^3.0.1",

+ 3 - 1
src/components/common/Soundrecord.vue

@@ -142,7 +142,9 @@ export default {
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
+  beforeDestroy() {
+      this.audio.pause();
+  }, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
   activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };