@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
< template >
< el -container :style ="appMain" ref = "main" v-show ="!flag.loading" >
< el -container ref = "main" v-show ="!flag.loading" class="root-container " >
< el -header v-show ="state.size.headHeight != '0px'" class="app-head" :height="state.size.headHeight" >
< Head :title ="title" :logo ="logo" :username ="username" >
< template # left >
@ -24,7 +24,7 @@
@@ -24,7 +24,7 @@
< / template >
< script lang = "ts" setup >
import { onBeforeUnmount , onMounted , reactive , ref , watch } from "vue" ;
import { onBeforeUnmount , onMounted , reactive , ref , watch , computed } from "vue" ;
import { useStore } from "vuex" ;
import { useRouter , useRoute } from "vue-router" ;
import { Api , NoobHead } from "noob-mengyxu" ;
@ -36,10 +36,6 @@ const { state, commit, dispatch } = useStore();
@@ -36,10 +36,6 @@ const { state, commit, dispatch } = useStore();
const emit = defineEmits ( [ "updatePwd" , "logout" ] ) ;
const router = useRouter ( ) ;
const route = useRoute ( ) ;
const appMain = reactive ( {
height : window . innerHeight + "px" ,
backgroundColor : state . style . bodyBg ,
} ) ;
const main = ref ( ) ;
const flag = reactive ( {
showHeader : true ,
@ -97,7 +93,6 @@ const props = defineProps({
@@ -97,7 +93,6 @@ const props = defineProps({
const onResize = ( ) => {
const height = window . innerHeight ;
appMain . height = height + "px" ;
commit ( "initSize" , [ height , window . innerWidth ] ) ;
} ;
@ -163,7 +158,7 @@ body {
@@ -163,7 +158,7 @@ body {
font - size : v - bind ( "state.size.fontSize" ) ! important ;
font - family : "Microsoft YaHei" ;
width : 100 % ;
height : 100 % ;
min - height : 100 vh ;
overflow : hidden ;
padding : 0 px ;
margin : 0 px ;
@ -171,12 +166,32 @@ body {
@@ -171,12 +166,32 @@ body {
< / style >
< style lang = "scss" scoped >
. root - container {
min - height : 100 vh ! important ;
height : 100 vh ! important ;
max - height : 100 vh ! important ;
display : flex ! important ;
flex - direction : column ! important ;
overflow : hidden ! important ;
background - color : v - bind ( "state.style.bodyBg" ) ;
}
# container {
flex : 1 1 auto ! important ;
min - height : 0 ! important ;
overflow : hidden ! important ;
}
. app - main {
box - shadow : 2 px 2 px 5 px 3 px # e5e6eb ;
border - radius : 4 px ;
margin : 0 px 0 px 0 px 3 px ! important ;
padding : 0 ! important ;
height : v - bind ( "state.size.mainHeight" ) ;
flex : 1 1 auto ! important ;
min - height : 0 ! important ;
display : flex ! important ;
flex - direction : column ! important ;
overflow : hidden ! important ;
}
. el - header ,