|
@@ -73,9 +73,7 @@
|
|
|
>
|
|
|
<img
|
|
|
class="painting"
|
|
|
- :style="{
|
|
|
- opacity: 1 - Math.max(stemOpacity * 0.5, leafOpacity * 0.5, stoneOpacity * 0.5),
|
|
|
- }"
|
|
|
+
|
|
|
src="@/assets/images/home-painting.jpg"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
@@ -124,7 +122,7 @@
|
|
|
<HotspotComp
|
|
|
v-show="isShowHotspot"
|
|
|
class="hotspot-2"
|
|
|
- @click="isShowPaintingDetail = true"
|
|
|
+ @click="showBigPainting"
|
|
|
/>
|
|
|
<HotspotComp
|
|
|
v-show="isShowHotspot"
|
|
@@ -215,7 +213,7 @@
|
|
|
@close="isShowHotspotDetail1 = false"
|
|
|
/>
|
|
|
</Transition>
|
|
|
- <Transition name="fade-in-out">
|
|
|
+ <!-- <Transition name="fade-in-out">
|
|
|
<PaintingDetail
|
|
|
v-if="isShowPaintingDetail"
|
|
|
:thumb="require(`@/assets/images/home-painting.jpg`)"
|
|
@@ -231,7 +229,7 @@
|
|
|
class="hotspot-detail painting-detail"
|
|
|
@close="isShowPaintingDetail = false"
|
|
|
/>
|
|
|
- </Transition>
|
|
|
+ </Transition> -->
|
|
|
<Transition name="fade-in-out">
|
|
|
<HotspotDetail3
|
|
|
v-if="isShowHotspotDetail3"
|
|
@@ -243,14 +241,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, computed, watch, onMounted, inject } from "vue"
|
|
|
+import { ref, computed, watch, onMounted, inject, onBeforeUnmount } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import Startup from '@/views/StartupView.vue'
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
import HotspotDetail1 from '@/views/HotspotDetail1.vue'
|
|
|
-import PaintingDetail from '@/views/PaintingDetail.vue'
|
|
|
+// import PaintingDetail from '@/views/PaintingDetail.vue'
|
|
|
import HotspotDetail3 from '@/views/HotspotDetail3.vue'
|
|
|
+import { api as viewerApi } from 'v-viewer'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -272,10 +271,14 @@ const summaryDesc = configText.homepagePaintingSummary
|
|
|
|
|
|
const scrollerEl = ref(null)
|
|
|
const scrollerElScrollTop = ref(0)
|
|
|
+function onScroll() {
|
|
|
+ scrollerElScrollTop.value = scrollerEl.value.scrollTop
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
- scrollerEl.value.addEventListener('scroll', (e) => {
|
|
|
- scrollerElScrollTop.value = scrollerEl.value.scrollTop
|
|
|
- })
|
|
|
+ scrollerEl.value.addEventListener('scroll', onScroll)
|
|
|
+})
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ scrollerEl.value.addEventListener('scroll', onScroll)
|
|
|
})
|
|
|
|
|
|
const isShowOperationTip = ref(true)
|
|
@@ -429,8 +432,15 @@ const isShowHotspot = computed(() => {
|
|
|
})
|
|
|
|
|
|
const isShowHotspotDetail1 = ref(false)
|
|
|
-const isShowPaintingDetail = ref(false)
|
|
|
+// const isShowPaintingDetail = ref(false)
|
|
|
const isShowHotspotDetail3 = ref(false)
|
|
|
+
|
|
|
+function showBigPainting() {
|
|
|
+ viewerApi({
|
|
|
+ images: [require(`@/assets/images/home-painting-big.jpg`)],
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|