From c1be026c62398437ae276f40d98c523445e8c885 Mon Sep 17 00:00:00 2001 From: Yanghc Date: Tue, 20 Aug 2019 15:17:09 +0800 Subject: [PATCH] Update scroll-view.md --- docs/components/viewContainer/scroll-view.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/components/viewContainer/scroll-view.md b/docs/components/viewContainer/scroll-view.md index abc8305d793f..b4a93377fb8e 100755 --- a/docs/components/viewContainer/scroll-view.md +++ b/docs/components/viewContainer/scroll-view.md @@ -54,6 +54,11 @@ export default class PageView extends Component { console.log(e.detail) } + // or 使用箭头函数 + // onScrollToUpper = (e) => { + // console.log(e.detail) + // } + onScroll(e){ console.log(e.detail) } @@ -86,7 +91,7 @@ export default class PageView extends Component { style={scrollStyle} lowerThreshold={Threshold} upperThreshold={Threshold} - onScrollToUpper={this.onScrollToUpper} + onScrollToUpper={this.onScrollToUpper.bind(this)} // 使用箭头函数的时候 可以这样写 `onScrollToUpper={this.onScrollToUpper}` onScroll={this.onScroll} > A