优化页面抖动

This commit is contained in:
TOP糯米 2023-03-08 17:01:36 +08:00
parent 4fc458dc1f
commit 0bcb6e3311
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<template>
<view class="page-layout" v-show="isReady" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }">
<view class="page-layout" :style="{ backgroundColor: backgroundColor, minHeight: minHeight, opacity: isReady ? 1 : 0 }">
<view
v-if="showHeader"
class="page-header"
@ -90,11 +90,11 @@ export default {
isLogin: (state) => state.user.token.length > 0,
}),
},
async created() {
created() {
if (this.isLogin) {
this.$store.dispatch("user/info");
}
const { statusBarHeight, headerHeight } = await this.config;
const { statusBarHeight, headerHeight } = this.config;
// #ifndef H5
this.statusBarHeight = statusBarHeight;
this.headerHeight = headerHeight;
@ -132,6 +132,7 @@ export default {
max-width: 750px;
width: 100%;
margin: 0 auto;
transition: all .5s;
/* #ifdef H5 */
// tabBar
// padding-bottom: calc(@tabBarHeight - 50px);