change to 100vh

This commit is contained in:
KyleBing 2023-09-25 11:50:08 +08:00
parent de481f6abf
commit ad093d703a
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<el-container id="app" :style="`min-height: ${heightMinContainer}px`"> <el-container id="app">
<el-main class="p-0"> <el-main class="p-0">
<Home /> <Home />
</el-main> </el-main>
@ -41,15 +41,12 @@ export default {
data() { data() {
return { return {
version: config.version, version: config.version,
heightMinContainer: 800
}; };
}, },
created() { created() {
this.$nextTick(() => { this.$nextTick(() => {
this.heightMinContainer = innerHeight
this.finishLoad() this.finishLoad()
window.onresize = () => { window.onresize = () => {
this.heightMinContainer = innerHeight
} }
}); });
}, },

View File

@ -16,6 +16,7 @@ body{
} }
#app { #app {
min-height: 100vh;
text-align: center; text-align: center;
color: $text-main; color: $text-main;
padding: 30px; padding: 30px;