From 1d2e9bcdb5b08893f36da5416d681937afd7f4ca Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 25 Dec 2025 23:02:50 +0800 Subject: [PATCH] =?UTF-8?q?review=EF=BC=9Atabbar=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BC=A0=E5=8F=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/category.vue | 1 + sheep/store/app.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/index/category.vue b/pages/index/category.vue index 9ce51c72..a95f4f0d 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -131,6 +131,7 @@ getGoodsList(); } function initMenuIndex() { + // TODO @AI:可优化:增加一个 params.id 的兼容 const appStore = sheep.$store('app'); // 处理 tabbar 传参的情况 const tabbarParams = appStore.paramsForTabbar || {}; diff --git a/sheep/store/app.js b/sheep/store/app.js index c17a9382..9b9ea32e 100644 --- a/sheep/store/app.js +++ b/sheep/store/app.js @@ -114,13 +114,13 @@ const app = defineStore({ $router.error('InitError', res.msg || '加载失败'); } }, - // 设置paramsForTabbar + // 设置 paramsForTabbar setParamsForTabbar(params = {}) { this.paramsForTabbar = params; }, clearParamsForTabbar() { this.paramsForTabbar = {}; - } + }, }, persist: { enabled: true,