Skip to content

Commit

Permalink
style(view): 优化今日天气组件的风向和风速显示
Browse files Browse the repository at this point in the history
- 移除了多余的竖线分隔符
- 调整了风向和风速的显示格式
- 优化了代码的可读性和显示效果
  • Loading branch information
0xcaffebabe committed Oct 31, 2024
1 parent d5fdd5c commit 138be86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/view/component/TodaySummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ function TodaySummary(props: { weather: Weather | null }) {
<span style={{ verticalAlign: 'middle' }}></span>{weatherStr}
</div>
<p>湿度: {props.weather?.current.humidity.value}% |
体感:{props.weather?.current.feelsLike.value}℃ |
{WeatherUtils.windDegree2ReableDirection(parseFloat(props.weather?.current.wind.direction.value || '0'))}
{(parseFloat(props.weather?.current.wind.speed.value || '0') * 1000 / 3600).toFixed(2)} m/s
({weatherUtils.windSpeed2Level(parseFloat(props.weather?.current.wind.speed.value || '0') * 1000 / 3600)}级风)
体感:{props.weather?.current.feelsLike.value}℃ | {WeatherUtils.windDegree2ReableDirection(parseFloat(props.weather?.current.wind.direction.value || '0'))}
{(parseFloat(props.weather?.current.wind.speed.value || '0') * 1000 / 3600).toFixed(2)} m/s ({weatherUtils.windSpeed2Level(parseFloat(props.weather?.current.wind.speed.value || '0') * 1000 / 3600)}级风)
</p>
</div>
)
Expand Down

0 comments on commit 138be86

Please sign in to comment.