|
@@ -112,6 +112,7 @@
|
|
|
<script>
|
|
|
import { onMounted, onUnmounted, watch, ref, reactive, computed } from "vue"
|
|
|
import StartUp from "@/components/StartUp.vue"
|
|
|
+import useWindowSizeAdaptor from '@/useFunctions/useWindowSizeAdaptor.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'HomeView',
|
|
@@ -123,7 +124,7 @@ export default {
|
|
|
function computeLabelsPos() {
|
|
|
labelPosList.value = []
|
|
|
for (const iterator of menu) {
|
|
|
- labelPosList.value.push(utils.mapPosFromDraftToWindow(iterator.pos))
|
|
|
+ labelPosList.value.push(utils.mapPosFromDraftToWindow(iterator.pos, 'contain'))
|
|
|
}
|
|
|
console.log(labelPosList)
|
|
|
}
|
|
@@ -138,10 +139,14 @@ export default {
|
|
|
const isHideMenu = ref(true)
|
|
|
const menu = reactive(config.sceneTree)
|
|
|
|
|
|
+ const { windowSizeWhenDesign, unit } = useWindowSizeAdaptor()
|
|
|
+
|
|
|
return {
|
|
|
labelPosList,
|
|
|
isHideMenu,
|
|
|
menu,
|
|
|
+ windowSizeWhenDesign,
|
|
|
+ unit,
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -190,14 +195,15 @@ export default {
|
|
|
top: 0;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- object-fit: cover;
|
|
|
+ object-fit: contain;
|
|
|
}
|
|
|
>.lion-male {
|
|
|
position: absolute;
|
|
|
- width: 219px;
|
|
|
- height: 206px;
|
|
|
- left: 78px;
|
|
|
- bottom: 48px;
|
|
|
+ width: calc(260 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ height: calc(246 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ left: calc(78 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ bottom: calc(48 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ z-index: 6;
|
|
|
>img {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
@@ -211,24 +217,21 @@ export default {
|
|
|
}
|
|
|
>.lion-female {
|
|
|
position: absolute;
|
|
|
- width: 150px;
|
|
|
- height: 193px;
|
|
|
+ width: calc(150 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ height: calc(193 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
right: 0;
|
|
|
- top: 129px;
|
|
|
+ top: calc(129 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ z-index: 6;
|
|
|
>img {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- z-index: 6;
|
|
|
}
|
|
|
&:hover {
|
|
|
- width: calc(150px * 1.1);
|
|
|
- height: calc(193px * 1.1);
|
|
|
- }
|
|
|
- @media only screen and (max-height: 630px){
|
|
|
- top: 100px;
|
|
|
+ width: calc(150 * 1.1 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
+ height: calc(193 * 1.1 / v-bind('windowSizeWhenDesign') * v-bind('unit'));
|
|
|
}
|
|
|
}
|
|
|
>menu {
|
|
@@ -322,7 +325,7 @@ export default {
|
|
|
// font-family: FZShaoEr-M11-Regular, FZShaoEr-M11;
|
|
|
// font-weight: 400;
|
|
|
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
|
|
- font-weight: bold;
|
|
|
+ // font-weight: bold;
|
|
|
color: #2D241D;
|
|
|
writing-mode: vertical-lr;
|
|
|
display: flex;
|
|
@@ -330,17 +333,10 @@ export default {
|
|
|
align-items: center;
|
|
|
z-index: 3;
|
|
|
>div {
|
|
|
- // transform: translateX(-1px);
|
|
|
- transform: translateX(-3px);
|
|
|
+ transform: translateX(calc(-3 / v-bind('windowSizeWhenDesign') * v-bind('unit')));
|
|
|
}
|
|
|
&:hover {
|
|
|
transform: scale(1.1);
|
|
|
- // color: #D11414;
|
|
|
- // background-image: url(@/assets/images/label-bg-active.png);
|
|
|
- // transform: translateX(-1px);
|
|
|
- // >div {
|
|
|
- // transform: initial;
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
}
|