修复页面闪动问题
This commit is contained in:
parent
01d511b620
commit
df5e9f2d15
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page-layout" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }">
|
<view class="page-layout" v-show="showPage" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }">
|
||||||
<view
|
<view
|
||||||
v-if="showHeader"
|
v-if="showHeader"
|
||||||
class="page-header"
|
class="page-header"
|
||||||
|
|
@ -41,6 +41,7 @@ export default {
|
||||||
name: "component-layout",
|
name: "component-layout",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showPage: false,
|
||||||
headerHeight: 0,
|
headerHeight: 0,
|
||||||
statusBarHeight: 0,
|
statusBarHeight: 0,
|
||||||
bodyPaddingTop: 0,
|
bodyPaddingTop: 0,
|
||||||
|
|
@ -94,8 +95,9 @@ export default {
|
||||||
this.$store.dispatch("user/info");
|
this.$store.dispatch("user/info");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
const { statusBarHeight, headerHeight } = this.config;
|
const { statusBarHeight, headerHeight } = await this.config;
|
||||||
|
this.showPage = true;
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
this.statusBarHeight = statusBarHeight;
|
this.statusBarHeight = statusBarHeight;
|
||||||
this.headerHeight = headerHeight;
|
this.headerHeight = headerHeight;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue