@@ -3956,11 +3956,14 @@ const loadSgLockInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
watch(vmId, () => { if (isPageActive) initPage() })
|
||||
const isCurrentRoute = () => route.name === 'VirtVmDetail'
|
||||
|
||||
watch(vmId, () => { if (isPageActive && isCurrentRoute()) initPage() })
|
||||
watch(activeTab, (tab) => { if (detail.value) triggerTabLoad(tab) })
|
||||
onActivated(() => {
|
||||
onActivated(async () => {
|
||||
isPageActive = true
|
||||
if (loadedVmId !== vmId.value) initPage()
|
||||
await nextTick()
|
||||
if (isCurrentRoute() && loadedVmId !== vmId.value) initPage()
|
||||
})
|
||||
onDeactivated(() => { isPageActive = false; stopMigratePolling() })
|
||||
onBeforeUnmount(() => { isPageActive = false; disposeCharts(); stopMigratePolling(); stopDetailAutoRefresh() })
|
||||
|
||||
Reference in New Issue
Block a user