Browse Source

fix: 自检离开清除定时器

feature/three
guoapeng 3 months ago
parent
commit
f3771ff924
  1. 5
      src/components/check/index.vue

5
src/components/check/index.vue

@ -3,7 +3,7 @@ import { getContainerList } from '@/apis/container'
import { getSelfFinish, getSelfStatus } from '@/apis/self'
import { ElMessage } from 'element-plus'
import { useHomeStore } from 'stores/homeStore'
import { onMounted, ref, watch } from 'vue'
import { onMounted, onUnmounted, ref, watch } from 'vue'
interface SelfStatus {
name: string
@ -29,6 +29,9 @@ watch(() => props.checking, (newVal) => {
onMounted(() => {
onStartSelfTest()
})
onUnmounted(() => {
clearInterval(patrolTimes.value)
})
const onStartSelfTest = () => {
if (props.checking) {

Loading…
Cancel
Save