فهرست منبع

feat(tabbar): 调整

feige996 11 ماه پیش
والد
کامیت
d35fabd893
6فایلهای تغییر یافته به همراه6 افزوده شده و 36 حذف شده
  1. 1 7
      pages.config.ts
  2. 2 7
      src/pages.json
  3. 1 0
      src/pages/mine/index.vue
  4. 0 20
      src/pages/my/index.vue
  5. 1 0
      src/types/components.d.ts
  6. 1 2
      src/types/uni-pages.d.ts

+ 1 - 7
pages.config.ts

@@ -49,17 +49,11 @@ export default defineUniPages({
       //   iconType: 'local',
       // },
       {
-        pagePath: 'pages/my/index',
+        pagePath: 'pages/mine/index',
         text: '我的',
         icon: 'iconfont icon-my',
         iconType: 'iconfont',
       },
-      {
-        iconPath: 'static/tabbar/personal.png',
-        selectedIconPath: 'static/tabbar/personalHL.png',
-        pagePath: 'pages/mine/index',
-        text: '我的',
-      },
     ],
   },
 })

+ 2 - 7
src/pages.json

@@ -38,16 +38,10 @@
         "iconType": "unocss"
       },
       {
-        "pagePath": "pages/my/index",
+        "pagePath": "pages/mine/index",
         "text": "我的",
         "icon": "iconfont icon-my",
         "iconType": "iconfont"
-      },
-      {
-        "iconPath": "static/tabbar/personal.png",
-        "selectedIconPath": "static/tabbar/personalHL.png",
-        "pagePath": "pages/mine/index",
-        "text": "我的"
       }
     ]
   },
@@ -81,6 +75,7 @@
     {
       "path": "pages/mine/index",
       "type": "page",
+      "layout": "tabbar",
       "style": {
         "navigationBarTitleText": "我的"
       }

+ 1 - 0
src/pages/mine/index.vue

@@ -1,5 +1,6 @@
 <route lang="json5">
 {
+  layout: 'tabbar',
   style: {
     navigationBarTitleText: '我的',
   },

+ 0 - 20
src/pages/my/index.vue

@@ -1,20 +0,0 @@
-<route lang="json5" type="page">
-{
-  layout: 'tabbar',
-  style: {
-    navigationBarTitleText: '我的',
-  },
-}
-</route>
-
-<template>
-  <view class="pt-40 text-xl text-center text-green-500">我的页面</view>
-</template>
-
-<script lang="ts" setup>
-//
-</script>
-
-<style lang="scss" scoped>
-//
-</style>

+ 1 - 0
src/types/components.d.ts

@@ -8,6 +8,7 @@ export {}
 declare module 'vue' {
   export interface GlobalComponents {
     FgNavbar: typeof import('./../components/fg-navbar/fg-navbar.vue')['default']
+    FgTabbar: typeof import('./../components/fg-tabbar/fg-tabbar.vue')['default']
     PrivacyPopup: typeof import('./../components/privacy-popup/privacy-popup.vue')['default']
   }
 }

+ 1 - 2
src/types/uni-pages.d.ts

@@ -6,7 +6,6 @@
 interface NavigateToOptions {
   url: "/pages/index/index" |
        "/pages/about/about" |
-       "/pages/my/index"|
        "/pages/login/index" |
        "/pages/mine/index" |
        "/pages/mine/about/index" |
@@ -16,7 +15,7 @@ interface NavigateToOptions {
 interface RedirectToOptions extends NavigateToOptions {}
 
 interface SwitchTabOptions {
-  url: "/pages/index/index" | "/pages/about/about" | "/pages/my/index"|"/pages/mine/index"
+  url: "/pages/index/index" | "/pages/about/about" | "/pages/mine/index"
 }
 
 type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;