From 8bda7dd0b18bc4e6c40d30e67969008f580bdad7 Mon Sep 17 00:00:00 2001 From: "Ray.Hao" <1490493387@qq.com> Date: Wed, 23 Jul 2025 21:44:48 +0800 Subject: [PATCH] =?UTF-8?q?wip:=20=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/composables/useTabbar.ts | 9 ----- src/layouts/tabbar.vue | 18 +++++---- src/main.ts | 3 ++ src/pages.json | 5 +++ src/pages/work/index.vue | 10 +++++ src/router/index.ts | 66 ++++++++++++++++++++++++++++++++ src/types/auto-imports.d.ts | 50 ++++-------------------- src/types/uni-mini-router.d.ts | 12 ++++++ src/types/virtual-uni-pages.d.ts | 16 ++++++++ vite.config.ts | 6 ++- 11 files changed, 136 insertions(+), 60 deletions(-) create mode 100644 src/router/index.ts create mode 100644 src/types/uni-mini-router.d.ts create mode 100644 src/types/virtual-uni-pages.d.ts diff --git a/package.json b/package.json index c6481e3..4e9622e 100644 --- a/package.json +++ b/package.json @@ -134,6 +134,7 @@ "stylelint-prettier": "^5.0.2", "typescript": "^4.9.4", "typescript-eslint": "^8.6.0", + "uni-mini-router": "^0.1.6", "unocss": "^0.62.4", "unocss-preset-weapp": "^0.62.2", "unplugin-auto-import": "^0.18.3", diff --git a/src/composables/useTabbar.ts b/src/composables/useTabbar.ts index f85d356..860c59a 100644 --- a/src/composables/useTabbar.ts +++ b/src/composables/useTabbar.ts @@ -1,12 +1,3 @@ -/* - * @Author: weisheng - * @Date: 2024-10-29 22:12:54 - * @LastEditTime: 2025-06-25 13:33:39 - * @LastEditors: weisheng - * @Description: - * @FilePath: /wot-demo/src/composables/useTabbar.ts - * 记得注释 - */ export interface TabbarItem { name: string; value: number | null; diff --git a/src/layouts/tabbar.vue b/src/layouts/tabbar.vue index 048fcc7..7c9bca4 100644 --- a/src/layouts/tabbar.vue +++ b/src/layouts/tabbar.vue @@ -13,7 +13,7 @@ v-for="(item, index) in tabbarList" :key="index" :name="item.name" - :value="item.value" + :value="getTabbarItemValue(item.name)" :title="item.title" :icon="item.icon" /> @@ -25,20 +25,24 @@