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
The default value of photoClosable in PhotoProvider is false, but passing render in PhotoView will cause the value of photoClosable to always be true. In other words, the function of photoClosable will fail, and clicking on the image or the mask will trigger the image to close.
The text was updated successfully, but these errors were encountered:
In the demo above, if src is passed to PhotoView instead of render, everything will work fine. So this props render will cause a bug in the program and needs to be fixed.
<PhotoProvider maskClassName={styles.mask} // visible={visible} // bannerVisible={!isInAppRes} // index={currentIndex} loop={false} // photoClosable={false} // maskClosable // onClose={handleClose} // onIndexChange={handleIndexChange} // overlayRender={overlayRender} > {imagesList.length > 0 && imagesList.map((image, index) => { return ( <PhotoView key={image.key} // src={image.url} width={image.width} height={image.height} render={() => { return ( <div className={styles.photoViewWrapper} onTouchStart={() => { debugger; }}> <img src={image.url} /> {/* // 仅对支持自动播放视频的App开放Live图片的显示, 否则展示静态图片 */} {(index === 0 && isSupportAutoPlay) ? ( <video src={videoSource} ref={videoRef} // src={image?.lpVideoUrl} controls={false} autoPlay={currentIndex === index} className={styles.liveImage} > <track kind="captions" /> </video> ) : ( <img src={image.url} /> )} </div> ); }} > <img className={styles.photoViewImg} src={image.url} /> </PhotoView> ); })} </PhotoProvider>
The default value of photoClosable in PhotoProvider is false, but passing render in PhotoView will cause the value of photoClosable to always be true. In other words, the function of photoClosable will fail, and clicking on the image or the mask will trigger the image to close.
The text was updated successfully, but these errors were encountered: