From bd95a6030cdeeb3acea564441d0c71feb6e708e2 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期一, 25 三月 2024 18:21:03 +0800 Subject: [PATCH] tabBar问题调整 --- custom-tab-bar/index.js | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index a38dc4a..aa4b9cd 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -4,11 +4,6 @@ selected: 0, list: TabMenu, }, - // observers: { - // 'active': function (newValue) { - // console.log('active鍙樺寲', newValue); - // } - // }, methods: { changeTab(item) { this.setData({ @@ -18,17 +13,6 @@ url: this.data.list[this.data.selected].url.startsWith('/') ? this.data.list[this.data.selected].url : `/${this.data.list[this.data.selected].url}`, }); - }, - - // init() { - // const page = getCurrentPages().pop(); - // const route = page ? page.route.split('?')[0] : ''; - // const active = this.data.list.findIndex( - // (item) => - // (item.url.startsWith('/') ? item.url.substr(1) : item.url) === - // `${route}`, - // ); - // this.setData({ active }); - // }, + } }, }); -- Gitblit v1.9.1