Skip to content

Commit

Permalink
fix(types): add refresher to ScrollViewProps close #5400 (#5399)
Browse files Browse the repository at this point in the history
* fix(types): add refresher to ScrollViewProps

weapp scroll-view 2.10.1 new property.

* Update packages/taro-components/types/ScrollView.d.ts

Co-Authored-By: Garfield Lee <[email protected]>

* Update packages/taro-components/types/ScrollView.d.ts

Co-Authored-By: Garfield Lee <[email protected]>

* Update packages/taro-components/types/ScrollView.d.ts

Co-Authored-By: Garfield Lee <[email protected]>

* Update packages/taro-components/types/ScrollView.d.ts

Co-Authored-By: Garfield Lee <[email protected]>

* fix(types): add refresher to ScrollViewProps

weapp scroll-view 2.10.1 new property.

Co-authored-by: Garfield Lee <[email protected]>
  • Loading branch information
onlyling and Garfield550 authored Jan 31, 2020
1 parent f0c1e39 commit 9a975f1
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion packages/taro-components/types/ScrollView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,69 @@ export interface ScrollViewProps extends StandardProps {
*
* `event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}`
*/
onScroll?: (event: CommonEventFunction) => any
onScroll?: (event: CommonEventFunction) => any,

/**
* 开启 scroll anchoring 特性,即控制滚动位置不随内容变化而抖动,仅在 iOS 下生效,安卓下可参考 CSS overflow-anchor 属性。
*
* 默认值:`false`
*/
scrollAnchoring?: boolean;

/**
* 开启自定义下拉刷新
*
* 默认值:`false`
*/
refresherEnabled?: boolean,

/**
* 设置自定义下拉刷新阈值
*
* 默认值:`45`
*/
refresherThreshold?: number,

/**
* 设置自定义下拉刷新默认样式,支持设置 black | white | none, none 表示不使用默认样式
*
* 默认值:`black`
*/
refresherDefaultStyle?: 'black' | 'white' | 'none',

/**
* 设置自定义下拉刷新区域背景颜色
*
* 默认值:`#FFF`
*/
refresherBackground?: string,

/**
* 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
*
* 默认值:`false`
*/
refresherTriggered?: boolean,

/**
* 自定义下拉刷新控件被下拉
*/
onRefresherPulling?: (event: CommonEventFunction) => any,

/**
* 自定义下拉刷新被触发
*/
onRefresherRefresh?: (event: CommonEventFunction) => any,

/**
* 自定义下拉刷新被复位
*/
onRefresherRestore?: (event: CommonEventFunction) => any,

/**
* 自定义下拉刷新被中止
*/
onRefresherAbort?: (event: CommonEventFunction) => any,
}

/**
Expand Down

0 comments on commit 9a975f1

Please sign in to comment.