|
@@ -51,8 +51,8 @@
|
|
|
isScene1: item.sceneIdx === 0,
|
|
|
isScene2: item.sceneIdx === 1,
|
|
|
isScene3: item.sceneIdx === 2,
|
|
|
- isOdd: (idx + 1) % 2 === 0,
|
|
|
- isEven: (idx + 1) % 2 === 1,
|
|
|
+ isOdd: (idx) % 2 === 0,
|
|
|
+ isEven: (idx) % 2 === 1,
|
|
|
}"
|
|
|
@click="onClickItem(item.idx)"
|
|
|
>
|
|
@@ -85,12 +85,14 @@ import { ref, computed, watch, watchEffect, onMounted, nextTick } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import useSmoothSwipe from '@/useFunctions/useSmoothSwipe.js'
|
|
|
-import { useElementSize } from '@vueuse/core'
|
|
|
+import { useElementSize, useWindowSize } from '@vueuse/core'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
|
|
|
|
+const { height: windowHeight } = useWindowSize()
|
|
|
+
|
|
|
const cascaderValueInit = (route.query.sceneIdx && route.query.cameraIdx) ? [route.query.sceneIdx, route.query.cameraIdx] : ['0', '0']
|
|
|
const cascaderValue = ref(cascaderValueInit)
|
|
|
const cameraTree = ref([
|
|
@@ -419,10 +421,21 @@ function onClickItem(idx) {
|
|
|
>img {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
- bottom: calc(40 / @page-height-design-px * 100vh * 0.83);
|
|
|
- width: 100%;
|
|
|
- height: 40%;
|
|
|
+ left: 50%;
|
|
|
+ translate: -50% 0;
|
|
|
object-fit: contain;
|
|
|
+ scale: calc(v-bind('windowHeight') / @page-height-design-px);
|
|
|
+ transform-origin: center bottom;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.relic-item.isOdd{
|
|
|
+ >img{
|
|
|
+ bottom: calc(250 / @page-height-design-px * 100vh * 0.83);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.relic-item.isEven{
|
|
|
+ >img{
|
|
|
+ bottom: calc(120 / @page-height-design-px * 100vh * 0.83);
|
|
|
}
|
|
|
}
|
|
|
>.relic-item.isScene1.isOdd{
|