Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

无法滑动图片,滑动事件老是触发点击事件 #448

Open
mmyhs opened this issue Feb 2, 2021 · 1 comment
Open

无法滑动图片,滑动事件老是触发点击事件 #448

mmyhs opened this issue Feb 2, 2021 · 1 comment

Comments

@mmyhs
Copy link

mmyhs commented Feb 2, 2021

无法滑动图片,滑动事件老是触发点击事件。
目前的我只能把代码改成这样,
<Modal
visible={modalVisible}
transparent={true}
onRequestClose={() => setModalVisible(false)}>
<ImageViewer
imageUrls={listData}
onSave={(url) => {
console.log('onSave=>', url);
}}
onClick={(onCancel) => {
console.log('onClick=>', onCancel);
}}
menus={() => null}
menuContext={{saveToLocal: '保存图片', cancel: '取消'}}
index={index}
enableSwipeDown={false}
saveToLocalByLongPress={false}
/>

改成这样后,图片仅只有预览功能,还是不可以滑动

感觉还不如直接用,<Image source={{uri=""}} />

@xinyangmaojian
Copy link

我也遇到这个问题了。
然后发现是开了react native debugger 关掉这个调试工具以后我的就可以滑动了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants