소스 검색

fix: activate the tab label correctly

nian 2 달 전
부모
커밋
787c21cf88
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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(