Browse Source

fix: activate the tab label correctly

nian 2 tháng trước cách đây
mục cha
commit
787c21cf88
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/layout/component/Tabs.vue

+ 3 - 1
src/layout/component/Tabs.vue

@@ -281,7 +281,9 @@ function scrollToActiveTab() {
 }
 
 const routerAfterEach = router.afterEach(() => {
-  pendingActiveKey.value = tabActiveKey.value
+  nextTick(() => {
+    pendingActiveKey.value = tabActiveKey.value
+  })
 })
 
 watch(