This commit is contained in:
Li1304553726 2025-11-17 19:58:04 +08:00
parent f8138c7ffb
commit d773b5fab0
1 changed files with 40 additions and 51 deletions

View File

@ -67,11 +67,8 @@ export function WeatherSearchForm() {
<AlertCircle className="inline w-4 h-4 text-red-500 mt-0.5" />
<p className="text-red-500 text-xs">{inputError}</p>
</div>
)
}
<div className='flex gap-2'>
<Button type="submit" disabled={isLoading || !city.trim()} className="mt-4 w-full">
{isLoading ? <>
@ -85,18 +82,10 @@ export function WeatherSearchForm() {
{currentWeather && (
<Button type="button" variant="outline" onClick={refreshWeather} disabled={isLoading} className="mt-4 w-full" title='刷新数据'>
<RefreshCw className={cn("w-5 h-5", isLoading && "animate-spin")} />
</Button>
)}
</div>
</form>
</div>
)
}