From 74b10646721d115beeab154963381c81f041bf43 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 5 Nov 2020 11:12:16 +0800 Subject: [PATCH] fix(h5): watch selected change (customTabBar.vue) --- src/platforms/h5/components/app/customTabBar.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platforms/h5/components/app/customTabBar.vue b/src/platforms/h5/components/app/customTabBar.vue index 986c87a8a9..19255a1240 100644 --- a/src/platforms/h5/components/app/customTabBar.vue +++ b/src/platforms/h5/components/app/customTabBar.vue @@ -90,6 +90,9 @@ export default { } }, watch: { + selected (val) { + this.selectedIndex = val + }, '$route' (to, from) { if (to.meta.isTabBar) { const index = tabBar.list.findIndex(item => to.meta.pagePath === item.pagePath) -- GitLab