Browse Source

修复语音矩阵

dusenyao 3 years ago
parent
commit
5a6fdb78cb
1 changed files with 10 additions and 4 deletions
  1. 10 4
      src/components/Adult/preview/VoiceMatrix.vue

+ 10 - 4
src/components/Adult/preview/VoiceMatrix.vue

@@ -277,6 +277,11 @@ export default {
       return (type.length > 0 && index >= 0) || (row >= 0 && column >= 0);
     }
   },
+  watch: {
+    hasSelectedCell() {
+      this.handleParentPlay();
+    }
+  },
   methods: {
     // 鼠标移入移出
     matrixCellMouseenter(i, j, type) {
@@ -341,7 +346,7 @@ export default {
       if (type.length > 0 && index >= 0 && type === "row") {
         this.curQue.voiceMatrix.matrix[index].forEach(item => {
           if (
-            item.type !== "connection" ||
+            item.type === "SentenceSegwordChs" ||
             (item.type === "text" && item.text.length > 0)
           ) {
             this.lrcArray.push(item.lrc_data);
@@ -353,11 +358,12 @@ export default {
 
       if (type.length > 0 && index >= 0 && type === "column") {
         this.curQue.voiceMatrix.matrix.forEach(item => {
+          let data = item[index];
           if (
-            item.type !== "connection" ||
-            (item.type === "text" && item.text.length > 0)
+            data.type === "SentenceSegwordChs" ||
+            (data.type === "text" && data.text.length > 0)
           ) {
-            this.lrcArray.push(item[index].lrc_data);
+            this.lrcArray.push(data.lrc_data);
           }
         });
         if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);