gpt4 book ai didi

android - 有滚动条时 map 对触摸没有反应

转载 作者:行者123 更新时间:2023-11-30 00:32:05 25 4
gpt4 key购买 nike

<分区>

我正在使用 android,为什么当有滚动条时, map 对触摸事件的 react 不流畅。我正在尝试拖动 map ,但整个页面都在向上滚动。我们如何做到当我们在 map 内部拖动时,只有 map 容器会响应触摸事件?

如果屏幕上没有滚动条/只有传单, map 会优雅地平移/拖动。 enter image description here

PS:我试过在 map 选项中设置tap:false,但是没有用。我正在使用传单 1.0.3

示例代码:

主窗体组件

  <Container>
<Header>
<Title>Main</Title>
</Header>
<Content>
<TestWV />
<Grid>
<Col style={{ height: 700,
justifyContent: 'center',
alignItems: 'center', }}
>
<Row size={1} >
<TouchableOpacity onPress={this.onMiniApp1Press.bind(this)}>
<Thumbnail square size={100} source={oneminute}
/>
</TouchableOpacity>
</Row>
<Row size={1} >
</Row>
</Col>
<Col style={{ height: 700,
justifyContent: 'center',
alignItems: 'center', }}
>
<Row size={1} >
<TouchableOpacity>
<Thumbnail square size={100} source={pakipoo}
/>
</TouchableOpacity>
</Row>
<Row size={1} >
</Row>
</Col>
</Grid>
</Content>
</Container>

TestWV 组件

     <View>
<WebView
source={{uri: 'http://yahoo.com'}}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={true}
style={{ height: 500, flex: 1 }}

>
</WebView>
</View>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com