|
@@ -12,7 +12,11 @@
|
|
|
<menu
|
|
|
:style="{
|
|
|
backgroundImage: `url(${getMenuBgImgUrl()})`,
|
|
|
- ...sceneInfo.level2MenuStyle,
|
|
|
+ paddingTop: `calc(${sceneInfo.level2MenuStyle.paddingTop} / ${windowSizeWhenDesign} * ${unit})`,
|
|
|
+ right: sceneInfo.level2MenuStyle.right ? `calc(${sceneInfo.level2MenuStyle.right} / ${windowSizeWhenDesign} * ${unit})` : '',
|
|
|
+ left: sceneInfo.level2MenuStyle.left ? `calc(${sceneInfo.level2MenuStyle.left} / ${windowSizeWhenDesign} * ${unit})` : '',
|
|
|
+ width: `calc(${sceneInfo.level2MenuStyle.width} / ${windowSizeWhenDesign} * ${unit})`,
|
|
|
+ height: `calc(${sceneInfo.level2MenuStyle.height} / ${windowSizeWhenDesign} * ${unit})`,
|
|
|
}"
|
|
|
>
|
|
|
<div
|
|
@@ -35,9 +39,27 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import useWindowSizeAdaptor from '@/useFunctions/useWindowSizeAdaptor.js'
|
|
|
+import { reactive } from "vue"
|
|
|
+import { useRoute, useRouter } from "vue-router"
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
name: 'Level2View',
|
|
|
+ setup() {
|
|
|
+ const route = useRoute()
|
|
|
+ const router = useRouter()
|
|
|
+
|
|
|
+ const { windowSizeWhenDesign, unit } = useWindowSizeAdaptor()
|
|
|
+
|
|
|
+ const sceneInfo = config.sceneTree[Number(route.query.sceneIdx)]
|
|
|
+
|
|
|
+ return {
|
|
|
+ windowSizeWhenDesign,
|
|
|
+ unit,
|
|
|
+ sceneInfo,
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
}
|
|
@@ -45,9 +67,6 @@ export default {
|
|
|
computed: {
|
|
|
...mapState([
|
|
|
]),
|
|
|
- sceneInfo() {
|
|
|
- return config.sceneTree[Number(this.$route.query.sceneIdx)]
|
|
|
- },
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
@@ -97,14 +116,14 @@ export default {
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
|
>.menu-item {
|
|
|
- height: 94px;
|
|
|
- font-size: 38px;
|
|
|
+ height: calc(94 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ font-size: calc(38 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
font-family: FZShaoEr-M11-Regular, FZShaoEr-M11;
|
|
|
font-weight: 400;
|
|
|
color: #2D241D;
|
|
|
line-height: 1.3;
|
|
|
cursor: pointer;
|
|
|
- margin-bottom: 15px;
|
|
|
+ margin-bottom: calc(15 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|