diff --git a/src/components/WeatherForecasts.vue b/src/components/WeatherForecasts.vue index fd0615c..12a9e62 100644 --- a/src/components/WeatherForecasts.vue +++ b/src/components/WeatherForecasts.vue @@ -32,6 +32,7 @@ const flicking: Ref = ref(null) watch(() => props.city, () => _fetchForecast(props.city.latitude, props.city.longitude)) onMounted(async () => await _fetchForecast(props.city.latitude, props.city.longitude)) +watch(() => forecast.value, () => currentPanelIndex.value = 0) async function _fetchForecast(latitude: number, longitude: number) { forecast.value = null