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
组件代码是这样的,线上一直有报警,报警信息就是undefined is not an object (evaluating 'h.$wrapperEl.transition'),但是一直没复现出来,定位代码的位置是 node_modules/@tarojs/components/dist/esm-es5/taro-swiper-core_2.entry.js 这个文件,不知道是我用法不对,还是源码哪块没有兼容,麻烦大佬给看下
constBanner=({ list })=>{const[activeDot,setActiveDot]=useState(0);useEffect(()=>{setActiveDot(0);},[list]);return(<ViewclassName={styles.container}>{list.length===1&&(<ViewclassName={styles.swiper}><ImageclassName={styles.swiperImage}src={list[0].imgUrl}></Image></View>)}{/* banner 轮播 */}{list.length>1&&(<Fragment><SwiperclassName={styles.swiper}circularautoplaycurrent={activeDot}onChange={({ detail })=>{setActiveDot(detail.current);}}>{list.map((banner)=>(<SwiperItemkey={banner.imgUrl}><Imagesrc={banner.imgUrl}></Image></SwiperItem>))}</Swiper>{/* 轮播图指示器 */}<ViewclassName={styles.indicatorDot}>{list.map((banner,index)=>(<Viewkey={banner.imgUrl}/>))}</View></Fragment>)}</View>);};
UA:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x18001023) NetType/WIFI Language/zh_CN miniProgram
相关平台
微信小程序
小程序基础库: h5
使用框架: React
复现步骤
组件代码是这样的,线上一直有报警,报警信息就是undefined is not an object (evaluating 'h.$wrapperEl.transition'),但是一直没复现出来,定位代码的位置是 node_modules/@tarojs/components/dist/esm-es5/taro-swiper-core_2.entry.js 这个文件,不知道是我用法不对,还是源码哪块没有兼容,麻烦大佬给看下
期望结果
不报错
实际结果
报错导致页面白屏
环境信息
补充信息
UA:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x18001023) NetType/WIFI Language/zh_CN miniProgram
浏览器:micromessenger 8.0.16
JS引擎:webkit 605.1.15
操作系统:ios15.4.1
设备:iphone
The text was updated successfully, but these errors were encountered: