diff --git a/src/views/monitoring/components/header.vue b/src/views/monitoring/components/header.vue index 150ef99..a775a0f 100644 --- a/src/views/monitoring/components/header.vue +++ b/src/views/monitoring/components/header.vue @@ -267,7 +267,7 @@ function getWeatherData() { //获取天气 getWeather().then((res: any) => { if (res.code === 200) { - if (isCurrentRoute) { + if (isCurrentRoute.value) { timer.value = setTimeout(async () => { await (timer.value && clearTimeout(timer.value)); await getWeatherData();