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 @@