You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeItem={a: stringb: string[]}const{ a, b }=(data||{})asItemreturn(<Swiper>{a ? (<Swiper.Item><videosrc={a}/></Swiper.Item>) : <></>}{b?.map((item,index)=>(<Swiper.Itemkey={index+1}><imgsrc={item}/></Swiper.Item>))}</Swiper>)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
antd-mobile: 5.32.0
代码如下:
Swiper 的类型如下:

问题描述:

b
数组遍历的代码报 ts 错误问一下,这种写法为什么会报错?
Beta Was this translation helpful? Give feedback.
All reactions