import { Divider } from 'antd'; import './index.less'; function weather({ weather }) { const obj = { 晴: (
), 阴: (
), 霾: (
), 雾: (
), 云: (
), 雷: (
), 雪: (
), 雨: (
), }; return (
{weather?.map((it, i) => { if (!it?.value) return null; let keyarr = Object.keys(obj); let curkey = keyarr.filter((item) => it?.value?.indexOf(item) !== -1)[0]; return (
{ window.open('https://www.baidu.com/s?wd=%E5%A4%A9%E6%B0%94'); }} > {it?.text} {obj[curkey]} {i === 0 && ( )}
); })}
); } export default weather;