fix: 拓扑定时器清除

This commit is contained in:
TsMask
2024-01-05 15:49:42 +08:00
parent 081a45f845
commit d29bd71d7d

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { reactive, onMounted, ref } from 'vue';
import { reactive, onMounted, ref, onBeforeUnmount } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import ChartGraphG6 from '@/components/ChartGraphG6/index.vue';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNe, stateNe } from '@/api/ne/ne';
@@ -157,6 +156,10 @@ onMounted(() => {
// 获取网元列表G
fnGetList();
});
onBeforeUnmount(() => {
clearTimeout(stateTimeout.value);
});
</script>
<template>