优化页面抖动
This commit is contained in:
parent
4fc458dc1f
commit
0bcb6e3311
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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
|
<view
|
||||||
v-if="showHeader"
|
v-if="showHeader"
|
||||||
class="page-header"
|
class="page-header"
|
||||||
|
@ -90,11 +90,11 @@ export default {
|
||||||
isLogin: (state) => state.user.token.length > 0,
|
isLogin: (state) => state.user.token.length > 0,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
async created() {
|
created() {
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.$store.dispatch("user/info");
|
this.$store.dispatch("user/info");
|
||||||
}
|
}
|
||||||
const { statusBarHeight, headerHeight } = await this.config;
|
const { statusBarHeight, headerHeight } = this.config;
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
this.statusBarHeight = statusBarHeight;
|
this.statusBarHeight = statusBarHeight;
|
||||||
this.headerHeight = headerHeight;
|
this.headerHeight = headerHeight;
|
||||||
|
@ -132,6 +132,7 @@ export default {
|
||||||
max-width: 750px;
|
max-width: 750px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
transition: all .5s;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
// 修复自定义tabBar后的遮挡问题
|
// 修复自定义tabBar后的遮挡问题
|
||||||
// padding-bottom: calc(@tabBarHeight - 50px);
|
// padding-bottom: calc(@tabBarHeight - 50px);
|
||||||
|
|
Loading…
Reference in New Issue