|
|
|
@ -10,7 +10,11 @@ export const useWeather = () => { |
|
|
|
{ icon: 'icon-duoyunzhuanyin', status: '阴' } |
|
|
|
] |
|
|
|
const store = useStore() |
|
|
|
const weather = computed(() => ({ temperature_Now: store.indexList.temperatureNow, status: store.indexList.weather })) |
|
|
|
const weather = computed(() => ({ |
|
|
|
temperatureLow: Math.floor(Number(store.indexList.temperatureLow)), |
|
|
|
temperatureHigh: Math.floor(Number(store.indexList.temperatureHigh)), |
|
|
|
status: store.indexList.weather |
|
|
|
})) |
|
|
|
const icon = computed(() => status.find(item => weather.value?.status?.includes(item.status)) ?? status[0]) |
|
|
|
|
|
|
|
return { weather, icon } |
|
|
|
|