refactor: 将page-container重命名为root-page-layout

将page-container组件重命名为root-page-layout,并更新所有文档中的引用,以更好地反映其作为页面根布局的角色。已更新AGENTS.md、README.md中的引用,并相应重命名了组件使用指南。
This commit is contained in:
熊熊熊子路 committed 2026-07-31 11:59:34 +08:00
1 parent 3f75ab4ef6
commit 11c6fb21cd
11 files changed
+46 -46

No files matched your search

@@ -1,6 +1,6 @@
/* components/page-container/page-container.wxss */
/* components/root-page-layout/root-page-layout.wxss */
.page-container {
.root-page-layout {
width: 100%;
min-height: 100vh;
display: flex;
@@ -16,7 +16,7 @@
}
}
.page-container__content {
.root-page-layout__content {
flex: 1;
width: 100%;
box-sizing: border-box;
@@ -1,4 +1,4 @@
// components/page-container/page-container.ts
// components/root-page-layout/root-page-layout.ts
Component({
/**
@@ -65,7 +65,7 @@ Component({
type: Boolean,
value: true,
},
// pageContainer背景色
// rootPageLayout 背景色
containerBackgroundColor: {
type: String,
value: '#f5f5f5',
@@ -1,6 +1,6 @@
<!--components/page-container/page-container.wxml-->
<!--components/root-page-layout/root-page-layout.wxml-->
<view
class="page-container {{containerSafeAreaInsetBottom ? 'page-container--safe' : ''}}"
class="root-page-layout {{containerSafeAreaInsetBottom ? 'root-page-layout--safe' : ''}}"
style="--pg-container-bg-color: {{containerBackgroundColor}};"
>
<!-- 导航栏 -->
@@ -27,7 +27,7 @@
<!-- 内容区域 -->
<view
class="page-container__content"
class="root-page-layout__content"
>
<slot></slot>
</view>
+1 -1
View File
@@ -1,5 +1,5 @@
{
"usingComponents": {
"page-container": "../../components/page-container/page-container"
"root-page-layout": "../../components/root-page-layout/root-page-layout"
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
<!--pages/date/date.wxml-->
<page-container navBarTitle="日期时间格式化示例" navBarBackgroundColor="#123321" navBarTextColor="#ffffff">
<root-page-layout navBarTitle="日期时间格式化示例" navBarBackgroundColor="#123321" navBarTextColor="#ffffff">
<view class="container">
<!-- formatTime 函数示例 -->
<view class="section">
@@ -69,4 +69,4 @@
</view>
</view>
</view>
</page-container>
</root-page-layout>
+1 -1
View File
@@ -3,7 +3,7 @@
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"usingComponents": {
"page-container": "../../components/page-container/page-container",
"root-page-layout": "../../components/root-page-layout/root-page-layout",
"t-input": "/miniprogram_npm/tdesign-miniprogram/input/input",
"t-button": "/miniprogram_npm/tdesign-miniprogram/button/button"
}
+2 -2
View File
@@ -1,5 +1,5 @@
<!--pages/login/login.wxml-->
<page-container title="Request 使用示例">
<root-page-layout title="Request 使用示例">
<view class="login-container">
<!-- 登录表单区域 -->
<view class="form-section">
@@ -27,4 +27,4 @@
</view>
</view>
</view>
</page-container>
</root-page-layout>