perf: 优化账号收集、账号改密、账号备份多次点击执行次数不能正常跳转到执行列表问题

This commit is contained in:
“huailei000”
2023-09-28 16:23:03 +08:00
committed by Bryan
parent e055429ff2
commit 2d2a4be3a2

View File

@@ -28,7 +28,7 @@
</template>
</el-tabs>
<transition appear mode="out-in" name="fade-transform">
<transition v-if="loading" appear mode="out-in" name="fade-transform">
<slot>
<keep-alive>
<component :is="computeActiveComponent" />
@@ -60,6 +60,11 @@ export default {
required: true
}
},
data() {
return {
loading: true
}
},
computed: {
iActiveMenu: {
get() {
@@ -90,6 +95,18 @@ export default {
return needActiveComponent
}
},
watch: {
$route(to, from) {
const activeTab = to.query?.activeTab
if (activeTab && this.iActiveMenu !== activeTab) {
this.iActiveMenu = activeTab
this.loading = false
setTimeout(() => {
this.loading = true
})
}
}
},
created() {
this.iActiveMenu = this.getPropActiveTab()
},