Prechádzať zdrojové kódy

fix: activate the tab label correctly

nian 2 mesiacov pred
rodič
commit
787c21cf88
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  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(