chenlei 9 месяцев назад
Родитель
Сommit
1229cbf98a
2 измененных файлов с 4 добавлено и 1 удалено
  1. 2 1
      scene/src/views/gui/components/guide.vue
  2. 2 0
      scene/src/views/gui/menu.vue

+ 2 - 1
scene/src/views/gui/components/guide.vue

@@ -33,7 +33,7 @@
 
     <div class="progress-box">
       <div class="info">
-        <span>{{ guidePlayIndex + 1 }}</span
+        <span>{{ guidePlayIndex < 0 ? '-' : (guidePlayIndex + 1) }}</span
         >of<span>{{ tourList.length }}</span>
       </div>
       <div class="bar-box"><div :style="`width:${100 / tourList.length}%;left:${(guidePlayIndex * 100) / tourList.length}%;`" class="current-box"></div></div>
@@ -69,6 +69,7 @@ export default {
   //监控data中的数据变化
   watch: {
     guidePlayIndex(v) {
+      if (v < 0) return
       this.swiper.slideTo(v)
     }
   },

+ 2 - 0
scene/src/views/gui/menu.vue

@@ -549,6 +549,8 @@ export default {
             //if (this.guideIsPlay) { //导览片段的选中与当前点位所属片段对应。
               this.setData({ guidePlayIndex: n.currentItem[0] });
             //}
+          } else {
+            this.setData({ guidePlayIndex: -1 });
           }
         });