From db9a1cb8638d0159e5bce586c0e6a0610bc2b625 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 21 二月 2025 13:58:20 +0800
Subject: [PATCH] fix: 页面
---
apps/taro/src/components/Layout/PageLayout.vue | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/apps/taro/src/components/Layout/PageLayout.vue b/apps/taro/src/components/Layout/PageLayout.vue
index 3a89eb7..9433d41 100644
--- a/apps/taro/src/components/Layout/PageLayout.vue
+++ b/apps/taro/src/components/Layout/PageLayout.vue
@@ -1,7 +1,7 @@
<template>
<Portal.Host>
<div :class="['page-layout-wrapper', { isWeb: isWeb }]" v-bind="$attrs">
- <slot v-if="showNavigationBar" name="navigationBar">
+ <slot v-if="_showNavigationBar" name="navigationBar">
<CommonNavigationBar v-bind="_commonNavigationBarProps" />
</slot>
@@ -45,7 +45,9 @@
import { useAuth } from '@/hooks';
import { Portal } from 'senin-mini/components';
import { usePickProps } from 'senin-mini/hooks';
-import { isWeb } from '@/utils/env';
+import { isWeb, isInAlipay, isInWeChat } from '@/utils/env';
+//@ts-ignore
+import { setPageTitle } from '@/utils';
defineOptions({
name: 'PageLayout',
@@ -72,7 +74,20 @@
},
});
+setPageTitle(props.title);
+
const _commonNavigationBarProps = usePickProps(props, commonNavigationBarProps);
+
+const _showNavigationBar = computed(() => {
+ if (props.showNavigationBar) {
+ if (isWeb) {
+ return !isInAlipay && !isInWeChat;
+ }
+ return true;
+ } else {
+ return false;
+ }
+});
const { isAuth } = useAuth({
needAuth: props.needAuth,
@@ -93,7 +108,7 @@
let pageHeight = pageHeightWithTabBar.value
? systemStore.pageHeightWithTab
: systemStore.pageHeight;
- pageHeight = pageHeight + (props.showNavigationBar ? 0 : navigationBarHeight.value);
+ pageHeight = pageHeight + (_showNavigationBar.value ? 0 : navigationBarHeight.value);
return pageHeight + 'px';
});
</script>
--
Gitblit v1.9.1