Commit ee02fdfd authored by 毛线's avatar 毛线

屏幕逻辑优化

parent 984ab81e
...@@ -41,7 +41,15 @@ export default { ...@@ -41,7 +41,15 @@ export default {
}), }),
initSceen() { initSceen() {
let zoom = 1 let zoom = 1
const { innerWidth, innerHeight } = window
console.log('innerWidth', innerWidth)
console.log('innerHeight', innerHeight)
if (innerWidth / innerHeight > 1080 / 608) {
console.log('比例')
zoom = window.innerHeight / 608
} else {
zoom = window.innerWidth / 1080 zoom = window.innerWidth / 1080
}
this.zoom = zoom this.zoom = zoom
}, },
}, },
...@@ -65,5 +73,7 @@ export default { ...@@ -65,5 +73,7 @@ export default {
width: 1080px; width: 1080px;
height: 608px; height: 608px;
position: relative; position: relative;
margin-left: auto;
margin-right: auto;
} }
</style> </style>
...@@ -48,9 +48,11 @@ export default { ...@@ -48,9 +48,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.main-layout { .main-layout {
height: 100%; height: 100%;
display: flex;
flex-direction: column;
} }
.main-content { .main-content {
height: 100%; flex: 1;
overflow: auto; overflow: auto;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment