Explorar o código

tree animation页添加滑动提示

任一存 %!s(int64=3) %!d(string=hai) anos
pai
achega
6343466cf7
Modificáronse 2 ficheiros con 20 adicións e 4 borrados
  1. 15 3
      src/components/SlideTip.vue
  2. 5 1
      src/views/TreeAnimation.vue

+ 15 - 3
src/components/SlideTip.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="slide-tip">
-    <div class="slide-tip_text">
-      文<br>脉
-    </div>
+    <div
+      class="slide-tip_text"
+      v-html="text"
+    />
     <img
       class="slide-tip_image"
       src="@/assets/image/下拉.png"
@@ -11,6 +12,17 @@
   </div>
 </template>
 
+<script>
+export default {
+  props: {
+    text: {
+      type: String,
+      default: '文<br>脉'
+    }
+  }
+}
+</script>
+
 <style lang="less" scoped>
 .slide-tip {
   position: absolute;

+ 5 - 1
src/views/TreeAnimation.vue

@@ -12,7 +12,11 @@
       @load="onImgLoad(index - 1)"
       @error="onImgError(index - 1)"
     >
-    <!-- <SlideTip class="slide-tip" /> -->
+    <SlideTip
+      v-show="currentFrameIdx === 927 - 1"
+      class="slide-tip"
+      text="了<br>解<br>详<br>情"
+    />
     <van-loading
       v-show="isLoading"
       color="#1989fa"