Selaa lähdekoodia

语音矩阵 最后一个时间兼容 -1

dusenyao 3 vuotta sitten
vanhempi
commit
30f5073b8b
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      src/components/Adult/preview/VoiceMatrix.vue

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

@@ -118,7 +118,7 @@
                     ? 'selected'
                     : '',
                   column.lrc_data.begin_time / 1000 <= curTime &&
-                    curTime < column.lrc_data.end_time / 1000
+                    (curTime < column.lrc_data.end_time / 1000 || column.lrc_data.end_time === -1)
                     ? 'playing'
                     : ''
                 ]"
@@ -150,7 +150,7 @@
                     ? 'selected'
                     : '',
                   column.lrc_data.begin_time / 1000 <= curTime &&
-                    curTime < column.lrc_data.end_time / 1000
+                    (curTime < column.lrc_data.end_time / 1000 || column.lrc_data.end_time === -1)
                     ? 'playing'
                     : ''
                 ]"
@@ -355,6 +355,7 @@ export default {
       this.$nextTick(() => {
         this.$refs.audioLine.onTimeupdateTime(begin_time / 1000);
         this.$refs.audioLine.PlayAudio();
+        if (end_time === -1) return;
         let end = end_time / 1000 - 0.01;
         let unWatch = this.$watch("curTime", val => {
           if (val >= end) {
@@ -400,6 +401,7 @@ export default {
         this.$refs.audioLine.onTimeupdateTime(begin_time / 1000);
         this.$refs.audioLine.PlayAudio();
         // 监听是否已到结束时间,为了选中效果 - 0.01
+        if (end_time === -1) return;
         let end = end_time / 1000 - 0.01;
         this.unWatch = this.$watch("curTime", val => {
           if (val >= end) {