ScrollView在H5中拨动区域外才能滑动
问题描述 ScrollView在H5中拨动区域外才能滑动
复现步骤
import Taro, { Component } from '@tarojs/taro'
import { View, Text, ScrollView } from '@tarojs/components'
export default class Index extends Component {
config = {
navigationBarTitleText: '首页',
enablePullDownRefresh: true
}
componentWillMount() { }
componentDidMount() { }
componentWillUnmount() { }
componentDidShow() { }
componentDidHide() { }
onScrollToLower(e) {
console.log('onScrollToLower', e)
}
onPullDownRefresh(e) {
console.log('onPullDownRefresh', e)
setTimeout(() => {
Taro.stopPullDownRefresh()
}, 1000)
}
render() {
const scrollStyle = {
width:'300px',
height: '400px',
'background-color': 'rgb(26, 50, 25)'
}
const vStyleA = {
width:'100px',
height: '150px',
'background-color': 'rgb(26, 173, 25)'
}
const vStyleB = {
width:'150px',
height: '150px',
'background-color': 'rgb(39,130,215)'
}
const vStyleC = {
width:'150px',
height: '150px',
'background-color': 'rgb(241,241,241)',
color: '#333'
}
return (
<ScrollView
scrollY
style={scrollStyle}
upperThreshold={20}
onScrollToLower={this.onScrollToLower}
>
<View style={vStyleA}>A</View>
<View style={vStyleB}>B</View>
<View style={vStyleC}>C</View>
</ScrollView>
)
}
}
期望行为 期望拨动ScrollView区域可滑动
报错信息

系统信息 Taro CLI 1.3.0 environment info: System: OS: Windows 10 Binaries: Node: 8.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
补充信息
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
发现y移除此事件后就正常了,但不知如何修正此问题
升级到 1.3.2 试试。 在 1.3.2 中没有复现
Hello~
您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。
如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。
Good luck and happy coding~
`import Taro, { Component } from '@tarojs/taro' import { ScrollView } from '@tarojs/components'
export default class PageView extends Component { constructor() { super(...arguments) }
onScrollToUpper(e){ console.log(e.detail) }
onScroll(e){ console.log(e.detail) }
render() {
const scrollStyle = {
height: '150px'
}
const scrollTop = 0
const Threshold = 20
const vStyleA = {
height: '150px',
'background-color': rgb(26, 173, 25)
}
const vStyleB = {
height: '150px',
'background-color': rgb(39,130,215)
}
const vStyleC = {
height: '150px',
'background-color': rgb(241,241,241),
color: '#333'
}
return (