lanxin 1 周之前
父节点
当前提交
45454dc182
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      hot/src/views/Home.vue

+ 5 - 0
hot/src/views/Home.vue

@@ -230,6 +230,11 @@ export default {
       }
       let item = this.activeObj.images[this.myInd];
       this.resetList(item);
+      // 切换暂停播放视频
+      if (this.selectedTitle.includes("視頻") && this.$refs.videoRef?.[oldVal]) {
+        console.log("----oldVal", oldVal);
+        this.$refs.videoRef[oldVal].pause();
+      }
     },
     activeObj(newVal) {
       this.resetList(newVal.images[this.myInd]);