From 561723e5b40f20d1e3e1d592cd2b2f48753b7e77 Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Fri, 14 Nov 2025 19:15:26 +0800 Subject: [PATCH] =?UTF-8?q?card=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1114/app/components/weather/WeatherCard.tsx | 46 ++++++++++++--------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/1114/app/components/weather/WeatherCard.tsx b/1114/app/components/weather/WeatherCard.tsx index 51f8436..dc1648d 100644 --- a/1114/app/components/weather/WeatherCard.tsx +++ b/1114/app/components/weather/WeatherCard.tsx @@ -1,33 +1,39 @@ -import { WeatherSearchForm } from "@/components/weather/WeatherSearchForm.tsx"; -import { WeatherDisplay } from "@/components/weather/WeatherDisplay.tsx"; -import { WeatherDetailsGrid } from "@/components/weather/WeatherDetailsGrid.tsx"; -import { useWeatherStore } from "@/store/weatherStore.tsx"; -import Cloud from "../../../assets/cloud.svg"; +import React, { useEffect } from 'react'; +import { WeatherSearchForm } from './WeatherSearchForm'; +import { WeatherDisplay } from './WeatherDisplay'; +import { WeatherDetailsGrid } from './WeatherDetailsGrid'; +import { useWeatherStore } from '@/store/weatherStore'; +import {Cloud} from "lucide-react"; export function WeatherCard() { const { currentWeather } = useWeatherStore(); - return ( -
- +
+ {/* 搜索表单区域 */} + + {/* 天气内容区域 */} + {currentWeather ? ( -
+
- ) : ( -
-
-
-
- -
+ ) : ( +
+
+
+
+ +
+
+

+ 暂无天气数据 +

+

+ 请搜索城市查看实时天气信息 +

-

暂无天气数据

-

请搜索城市查看实时天气信息

-
- )}
);