Commit bc620d54 by linjinhong

Merge remote-tracking branch 'origin/dev'

parents 9ab8b873 f66f6094
...@@ -1948,7 +1948,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue' ...@@ -1948,7 +1948,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue'
import ResultInfo from './components/ResultInfo.vue' import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate' import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
import {
useRouter,
type NavigationGuardNext,
type RouteLocationNormalized,
} from 'vue-router'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
...@@ -1982,6 +1986,7 @@ const exportVisible = ref(false) ...@@ -1982,6 +1986,7 @@ const exportVisible = ref(false)
const exportForm = ref({ const exportForm = ref({
resource: '', resource: '',
}) })
const exportData = () => { const exportData = () => {
exportVisible.value = true exportVisible.value = true
} }
...@@ -3880,8 +3885,10 @@ watch( ...@@ -3880,8 +3885,10 @@ watch(
}, },
{ immediate: true }, { immediate: true },
) )
onMounted(() => { onMounted(() => {
const podUsStatus = localStorage.getItem('podUsStatus') const podUsStatus = localStorage.getItem('podUsStatus')
if (podUsStatus) { if (podUsStatus) {
status.value = podUsStatus status.value = podUsStatus
} }
...@@ -4087,12 +4094,17 @@ function getPlatformImg(code: string) { ...@@ -4087,12 +4094,17 @@ function getPlatformImg(code: string) {
// 全局 loading 改为每行 loading map // 全局 loading 改为每行 loading map
const reComposingLoadingMap = reactive<{ [key: number]: boolean }>({}) const reComposingLoadingMap = reactive<{ [key: number]: boolean }>({})
window.addEventListener('beforeunload', () => { const handleBeforeRouteLeave = (
localStorage.removeItem('podUsStatus') to: RouteLocationNormalized,
// 执行全局清理操作 from: RouteLocationNormalized,
}) next: NavigationGuardNext,
onBeforeUnmount(() => { ) => {
localStorage.removeItem('podUsStatus') localStorage.removeItem('podUsStatus')
next()
}
useRouter().beforeEach((to, from, next) => {
handleBeforeRouteLeave(to, from, next)
}) })
</script> </script>
<style lang="scss" scoped> <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