Skip to content

Commit

Permalink
docs: ScrollView使用时,onScrolltoupper属性名未使用驼峰命名修改并完善 (#3187)
Browse files Browse the repository at this point in the history
ScrollView使用时,onScrolltoupper属性名未使用驼峰命名修改并完善
  • Loading branch information
TigerHee authored and luckyadam committed May 27, 2019
1 parent ce7fbfb commit 6e1703d
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions docs/components/viewContainer/scroll-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export default class PageView extends Component {
constructor() {
super(...arguments)
}

onScrollToUpper(e){
console.log(e.detail)
}

onScroll(e){
console.log(e.detail)
}

render() {
const scrollStyle = {
Expand All @@ -70,20 +78,21 @@ export default class PageView extends Component {
color: '#333'
}
return (
<ScrollView
className='scrollview'
scrollY
scrollWithAnimation
scrollTop={scrollTop}
style={scrollStyle}
lowerThreshold={Threshold}
upperThreshold={Threshold}
onScrolltoupper={this.onScrolltoupper}
onScroll={this.onScroll}>
<View style={vStyleA}>A</View>
<View style={vStyleB}>B</View>
<View style={vStyleC}>C</View>
</ScrollView>
<ScrollView
className='scrollview'
scrollY
scrollWithAnimation
scrollTop={scrollTop}
style={scrollStyle}
lowerThreshold={Threshold}
upperThreshold={Threshold}
onScrollToUpper={this.onScrollToUpper}
onScroll={this.onScroll}
>
<View style={vStyleA}>A</View>
<View style={vStyleB}>B</View>
<View style={vStyleC}>C</View>
</ScrollView>
)
}
}
Expand Down

0 comments on commit 6e1703d

Please sign in to comment.