nutui-react icon indicating copy to clipboard operation
nutui-react copied to clipboard

ImagePriview预览图片组件,自定义页码,点击末尾组件显示的是倒数第二个

Open qq1877915498 opened this issue 5 months ago • 1 comments

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

2.6.14

平台

weapp

重现链接

重现步骤

{/* 预览图片,视频组件 */} <ImagePreview images={images} videos={videos} defaultValue={currentIndex} value={currentIndex} visible={isShowPreview} indicator onChange={(value) => { console.log(value,'s') setCurrentIndex(value) }} onClose={() => setIsShowPreview(false)} ></ImagePreview>

const showPreview=(item,index)=>{ const i = index + 1 console.log(i,'ssssss') setCurrentIndex(i) setIsShowPreview(true) }

期望的结果是什么?

希望点击最后一个视频,图片正常显示最后一个,,

实际的结果是什么?

现在显示上一个的

环境信息

No response

其他补充信息

No response

qq1877915498 avatar Jul 25 '25 02:07 qq1877915498

幸苦提供一下 reproduction link

holyfata avatar Aug 18 '25 02:08 holyfata