From e0cb82c8dbf83fabc0cab548abc873926366fb75 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 21 五月 2025 17:29:15 +0800
Subject: [PATCH] fix: 修改ui

---
 apps/taro/src/components/Layout/PageLayout.vue |   49 +++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 30 deletions(-)

diff --git a/apps/taro/src/components/Layout/PageLayout.vue b/apps/taro/src/components/Layout/PageLayout.vue
index 02fa48e..d67b575 100644
--- a/apps/taro/src/components/Layout/PageLayout.vue
+++ b/apps/taro/src/components/Layout/PageLayout.vue
@@ -1,18 +1,8 @@
 <template>
   <Portal.Host>
-    <div :class="['page-layout-wrapper', { isWeb: isWeb }]" v-bind="$attrs">
+    <div :class="['page-layout-wrapper', { isWeb: isWeb, hasBgColor }]">
       <slot v-if="_showNavigationBar" name="navigationBar">
         <CommonNavigationBar v-bind="_commonNavigationBarProps" />
-      </slot>
-
-      <slot name="bg">
-        <div
-          v-if="hasLinearBg"
-          class="page-layout-linear-bg"
-          :style="{
-            height: '100%',
-          }"
-        ></div>
       </slot>
 
       <div class="page-layout-scroll-view-wrapper" :style="{ height: scrollViewHeight }">
@@ -48,31 +38,14 @@
 import { isWeb, isInAlipay, isInWeChat } from '@/utils/env';
 //@ts-ignore
 import { setPageTitle } from '@/utils';
+import { pageLayoutProps } from './layout';
 
 defineOptions({
   name: 'PageLayout',
   inheritAttrs: false,
 });
 
-const props = defineProps({
-  ...commonNavigationBarProps,
-  needAuth: {
-    type: Boolean,
-    default: true,
-  },
-  useView: {
-    type: Boolean,
-    default: false,
-  },
-  hasLinearBg: {
-    type: Boolean,
-    default: false,
-  },
-  linearBgHeight: {
-    type: Number,
-    default: 388,
-  },
-});
+const props = defineProps(pageLayoutProps);
 
 setPageTitle(props.title);
 
@@ -118,9 +91,25 @@
 <style lang="scss">
 @import '@/styles/common.scss';
 
+.page-layout-container {
+  height: 100%;
+  position: relative;
+
+  .page-layout-wrapper {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    z-index: 100;
+  }
+}
+
 .page-layout-wrapper {
   /* background-color: $body-background-color; */
 
+  &.hasBgColor {
+    background-color: $body-background-color;
+  }
+
   .page-layout-scroll-view-wrapper {
     display: flex;
     flex-direction: column;

--
Gitblit v1.9.1