From 314dcacdeecec4dff192b78bad5124b1b29a453d Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期四, 20 二月 2025 15:07:36 +0800 Subject: [PATCH] fix: 页面 --- apps/taro/src/components/Layout/PageLayout.vue | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/apps/taro/src/components/Layout/PageLayout.vue b/apps/taro/src/components/Layout/PageLayout.vue index 474d352..3a89eb7 100644 --- a/apps/taro/src/components/Layout/PageLayout.vue +++ b/apps/taro/src/components/Layout/PageLayout.vue @@ -1,6 +1,6 @@ <template> <Portal.Host> - <div class="page-layout-wrapper" v-bind="$attrs"> + <div :class="['page-layout-wrapper', { isWeb: isWeb }]" v-bind="$attrs"> <slot v-if="showNavigationBar" name="navigationBar"> <CommonNavigationBar v-bind="_commonNavigationBarProps" /> </slot> @@ -45,6 +45,7 @@ import { useAuth } from '@/hooks'; import { Portal } from 'senin-mini/components'; import { usePickProps } from 'senin-mini/hooks'; +import { isWeb } from '@/utils/env'; defineOptions({ name: 'PageLayout', @@ -85,7 +86,7 @@ ); const navigationBarHeight = computed( - () => systemStore.info.statusBarHeight + systemStore.navigationBarHeight + () => (systemStore.info.statusBarHeight || 0) + systemStore.navigationBarHeight ); const scrollViewHeight = computed(() => { @@ -94,16 +95,6 @@ : systemStore.pageHeight; pageHeight = pageHeight + (props.showNavigationBar ? 0 : navigationBarHeight.value); return pageHeight + 'px'; -}); - -Taro.getSetting({ - success: function (res) { - if (!res.authSetting['scope.userLocation']) { - Taro.authorize({ - scope: 'scope.userLocation', - }); - } - }, }); </script> @@ -137,5 +128,16 @@ filter: blur(0px); border-radius: 0px 0px 20px 20px; } + + &.isWeb { + height: 100%; + display: flex; + flex-direction: column; + + .page-layout-scroll-view-wrapper { + flex: 1; + min-height: 0; + } + } } </style> -- Gitblit v1.9.1