Commit 987c4ce7 by linjinhong

fix:修改问题

parent 2d1979df
......@@ -1933,7 +1933,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue'
import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json'
import {
useRouter,
type NavigationGuardNext,
type RouteLocationNormalized,
} from 'vue-router'
declare global {
interface Window {
ActiveXObject: {
......@@ -1967,6 +1971,7 @@ const exportVisible = ref(false)
const exportForm = ref({
resource: '',
})
const exportData = () => {
exportVisible.value = true
}
......@@ -3865,8 +3870,10 @@ watch(
},
{ immediate: true },
)
onMounted(() => {
const podUsStatus = localStorage.getItem('podUsStatus')
if (podUsStatus) {
status.value = podUsStatus
}
......@@ -4072,12 +4079,17 @@ function getPlatformImg(code: string) {
// 全局 loading 改为每行 loading map
const reComposingLoadingMap = reactive<{ [key: number]: boolean }>({})
window.addEventListener('beforeunload', () => {
localStorage.removeItem('podUsStatus')
// 执行全局清理操作
})
onBeforeUnmount(() => {
const handleBeforeRouteLeave = (
to: RouteLocationNormalized,
from: RouteLocationNormalized,
next: NavigationGuardNext,
) => {
localStorage.removeItem('podUsStatus')
next()
}
useRouter().beforeEach((to, from, next) => {
handleBeforeRouteLeave(to, from, next)
})
</script>
<style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment