fix: 修复NpmTabs从其他页面跳转后初始化不显示tab的问题

This commit is contained in:
刘洪洪
2022-12-14 14:14:32 +08:00
parent 156d472f10
commit 3e387162a5

View File

@@ -135,7 +135,7 @@ export default {
curTabIndex = curTabIndexInUrl
}
this.$nextTick(() => {
self.currentTab = curTabIndex
self.currentTab = JSON.stringify(curTabIndex)
self.isCurTabReady = true
// URL中tabIndex的设置client初始化时查询条件需要side条件
const { query } = this.$route
@@ -152,7 +152,7 @@ export default {
})
})
} else {
this.currentTab = curTabIndexInUrl || '0'
this.currentTab = JSON.stringify(curTabIndexInUrl) || '0'
this.isCurTabReady = true
setTimeout(() => {
this.handleActiveBar(this.currentTab)