Commit e2b51a1c by zsh

更新App.vue

parent 1c66aea5
Subproject commit 71c72f3e1aeff4aea211f74cc3e231a00b11c6c3 Subproject commit d23c1ed387a5099f276d4b2da2fbed7f4e005715
...@@ -18,13 +18,9 @@ export default { ...@@ -18,13 +18,9 @@ export default {
this.initScale() this.initScale()
}, },
beforeDestroy () {
window.removeEventListener('resize')
},
methods: { methods: {
initScale () { initScale () {
refreshScale(7550, 1216, 7550, 1216) refreshScale()
window.addEventListener('resize', refreshScale) window.addEventListener('resize', refreshScale)
} }
...@@ -32,7 +28,10 @@ export default { ...@@ -32,7 +28,10 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="less">
@designWidth: 1920px;
@designHeight: 1080px;
body { body {
background-color: #011428; background-color: #011428;
} }
...@@ -42,12 +41,11 @@ body { ...@@ -42,12 +41,11 @@ body {
left: 50%; left: 50%;
right: 0; right: 0;
bottom: 0; bottom: 0;
width: 1920px; width: @designWidth;
height: 1080px; height: @designHeight;
overflow: hidden; overflow: hidden;
user-select: none; user-select: none;
background-size: 1920px 1080px; background-size: @designWidth @designHeight;
background-position: center bottom; background-position: center bottom;
background-size: cover;
} }
</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