Browse Source

feat: 更新 CustomNav 组件,修改左侧按钮文本为“返回首页”,调整导航内容样式以增强用户体验

mcbaiyun 3 months ago
parent
commit
1b065b3833
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/components/CustomNav.vue

+ 5 - 4
src/components/CustomNav.vue

@@ -7,7 +7,7 @@
           <uni-icons type="back" size="20" color="#333"></uni-icons>
         </template>
         <template v-else-if="leftTypeComputed === 'home'">
-          <text class="home-text">首页</text>
+          <text class="home-text">返回首页</text>
         </template>
         <template v-else>
           <!-- 占位,保持左右对称 -->
@@ -74,14 +74,15 @@ const handleLeft = () => {
 }
 
 .nav-content {
+  margin-top: 2px;
   display: flex;
   align-items: center;
   height: 44px; /* increased to give more vertical space */
-  padding: 0 15px;
+  padding: 3px 15px;
 }
 
 .nav-left {
-  width: 40px;
+  width: 80px;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -102,6 +103,6 @@ const handleLeft = () => {
 }
 
 .nav-right {
-  width: 40px;
+  width: 80px;
 }
 </style>