Your Name 2 years ago
parent
commit
6f9b8f0bec

BIN
public/images/10-2.jpg View File


BIN
public/images/2.jpg View File


+ 1
- 0
src/components/Image.vue View File

@@ -23,6 +23,7 @@
23 23
         :key="`info-${inx}`"
24 24
         :center="infoCenters[inx]"
25 25
         :info="info"
26
+        :show-gesture="resource.showGesture"
26 27
       />
27 28
     </template>
28 29
   </div>

+ 1
- 1
src/components/NaviMap.vue View File

@@ -32,7 +32,7 @@ const props = defineProps({
32 32
 
33 33
 const elRef = ref()
34 34
 const width = ref(170)
35
-const height = ref(70)
35
+const height = ref(120)
36 36
 
37 37
 const [image] = useModel("mapImage");
38 38
 

+ 1
- 1
src/components/ScenicAudio.vue View File

@@ -51,7 +51,7 @@
51 51
   const gestureStyle = computed(() => {
52 52
     if (props.center && props.center.length > 1) {
53 53
       return {
54
-        left: `${props.center[0] - width.value}px`,
54
+        left: `${props.center[0] - width.value / 1.2}px`,
55 55
         top: `${props.center[1] - 12}px`
56 56
       }
57 57
     } else {

+ 66
- 19
src/components/ScenicDetail.vue View File

@@ -6,31 +6,78 @@
6 6
     @click="onShowInfoBtn"
7 7
   />
8 8
   <PopUpVue :show="showInfo" :info="info" :onClose="onCloseInfoBtn" />
9
+  <div v-if="showGesture" class="gesture2" :class="{ hidden: gestureHide }" :style="gestureStyle">
10
+    <i class="iconfont icon-cc-pointer-right"></i>
11
+  </div>
9 12
 </template>
10 13
 
11 14
 <script setup>  
12
-import { computed, ref, watch } from "vue";
15
+  import { computed, ref, watch } from "vue";
13 16
   import CoverBtn from "./CoverBtn.vue";
14
-import PopUpVue from "./PopUp.vue";
17
+  import PopUpVue from "./PopUp.vue";
15 18
 
16
-const props = defineProps({
17
-  center: Array,
18
-  info: {
19
-    type: Object,
20
-    default: () => ({})
21
-  }
22
-})
19
+  const props = defineProps({
20
+    center: Array,
21
+    info: {
22
+      type: Object,
23
+      default: () => ({})
24
+    },
25
+    showGesture: {
26
+      type: Boolean,
27
+      default: false,
28
+    },
29
+  })
23 30
 
24
-const showInfo = ref(false)
25
-const width = ref(50);
26
-const height = ref(120);
31
+  const showInfo = ref(false)
32
+  const width = ref(50);
33
+  const height = ref(120);
34
+  const gestureHide = ref(false);
27 35
 
28
-// 显示详情介绍
29
-const onShowInfoBtn = () => {
30
-  showInfo.value=true
31
-};
36
+  const gestureStyle = computed(() => {
37
+    if (props.center && props.center.length > 1) {
38
+      return {
39
+        left: `${props.center[0] - 12}px`,
40
+        top: `${props.center[1] - height.value / 1.8}px`
41
+      }
42
+    } else {
43
+      return {};
44
+    }
45
+  });
46
+  // 显示详情介绍
47
+  const onShowInfoBtn = () => {
48
+    gestureHide.value = true;
49
+    showInfo.value=true
50
+  };
32 51
 
33
-const onCloseInfoBtn = () => {
34
-  showInfo.value=false
35
-};
52
+  const onCloseInfoBtn = () => {
53
+    showInfo.value=false
54
+  };
36 55
 </script>
56
+
57
+<style lang="less" scoped>
58
+
59
+.gesture2 {
60
+    position: absolute;
61
+    z-index: 9;
62
+    animation: gestureAnimation2 1.6s ease-in-out infinite;
63
+
64
+    .iconfont {
65
+      font-size: 24px;
66
+    }
67
+
68
+    &.hidden {
69
+      display: none;
70
+    }
71
+  }
72
+
73
+  @keyframes gestureAnimation2 {
74
+    from {
75
+      opacity: 0;
76
+      transform: translateY(0) rotate(90deg);
77
+    }
78
+    to {
79
+      opacity: 1;
80
+      transform: translateY(12px) rotate(90deg);
81
+    }
82
+  }
83
+</style>