From df5e9f2d15d2e66361defca13555f9f7f2f9d7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Wed, 8 Mar 2023 15:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2=E9=97=AA?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/layout.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/layout/layout.vue b/src/components/layout/layout.vue index 74e6bcc..b556d23 100644 --- a/src/components/layout/layout.vue +++ b/src/components/layout/layout.vue @@ -1,5 +1,5 @@ <template> - <view class="page-layout" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }"> + <view class="page-layout" v-show="showPage" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }"> <view v-if="showHeader" class="page-header" @@ -41,6 +41,7 @@ export default { name: "component-layout", data() { return { + showPage: false, headerHeight: 0, statusBarHeight: 0, bodyPaddingTop: 0, @@ -94,8 +95,9 @@ export default { this.$store.dispatch("user/info"); } }, - mounted() { - const { statusBarHeight, headerHeight } = this.config; + async mounted() { + const { statusBarHeight, headerHeight } = await this.config; + this.showPage = true; // #ifndef H5 this.statusBarHeight = statusBarHeight; this.headerHeight = headerHeight;