Browse Source

slide tip组件更新

任一存 3 năm trước cách đây
mục cha
commit
febee0a43d
2 tập tin đã thay đổi với 8 bổ sung9 xóa
  1. 1 0
      src/components/SlideTip.vue
  2. 7 9
      src/views/TreeAnimation.vue

+ 1 - 0
src/components/SlideTip.vue

@@ -26,6 +26,7 @@
     width: 0.94rem;
     height: 2.47rem;
     margin-top: 0.94rem;
+    transform: rotate(180deg);
   }
 }
 @keyframes twinkle {

+ 7 - 9
src/views/TreeAnimation.vue

@@ -43,20 +43,18 @@ export default {
         } while (this.imgStateList[this.currentFrameIdx] === false)
         if (this.currentFrameIdx >= 927 - 1) {
           clearInterval(this.intervalId)
+          let mc = new Hammer(this.$refs['hammer-target'])
+          mc.get('pan').set({ direction: Hammer.DIRECTION_ALL })
+          const that = this
+          mc.on("panup", function me() {
+            mc.off('panup', me)
+            that.$router.push({ name: 'TreeSelection' })
+          })
         }
       } else {
         this.isLoading = true
       }
     }, 41)
-
-    let mc = new Hammer(this.$refs['hammer-target'])
-    mc.get('pan').set({ direction: Hammer.DIRECTION_ALL })
-    const that = this
-    mc.on("panup", function me(ev) {
-      mc.off('panup', me)
-      clearInterval(that.intervalId)
-      that.$router.push({ name: 'TreeSelection' })
-    })
   },
   unmounted() {
   },