From 754963fe17064bd072fc071739559a3acb68b5ba Mon Sep 17 00:00:00 2001 From: szdot Date: Mon, 12 May 2025 03:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E4=B8=BB=E9=A1=B5=E7=82=B9=E5=87=BB=20=E2=80=9D?= =?UTF-8?q?=E5=95=86=E5=93=81=E8=B4=AD=E4=B9=B0=E6=8C=89=E9=92=AE=E2=80=9C?= =?UTF-8?q?=20=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2=E6=97=B6=E5=80=99?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=20=E6=8C=87=E5=AE=9A=E7=9A=84'shop'?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=9A=84=E5=AF=BC=E8=88=AA=E7=9A=84=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E4=BD=8D=E7=BD=AE=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- pages/index/index.vue | 2 +- pages/shop/list.vue | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 4886571..f697af2 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -33,7 +33,7 @@ - diff --git a/pages/shop/list.vue b/pages/shop/list.vue index 7781886..b87d2c4 100644 --- a/pages/shop/list.vue +++ b/pages/shop/list.vue @@ -97,8 +97,22 @@ scrollingTiemout: null, //timeout对象 } }, + onLoad(options) { + //get参数里面有shop 页面加载完成后 跳转对应标签的导航高度位置 + if (options.tag === 'shop') { + this.$nextTick(() => { + setTimeout(() => { + const index = this.menuList.findIndex(item => item.tag === 'shop') + if (index !== -1) { + this.swichMenu(index) + } + }, 300) // 延迟300ms确保menuList有时间加载 + }) + } + }, onReady() { this.getMenuItemTop() + //this.swichMenu(this.menuList.length - 1) // 激活最后一项 }, onShow() { // 当页面显示时,设置tabber的激活项