Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type): 修复 ScrollView 监听函数类型 #6075

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/taro-components/types/ScrollView.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentType } from 'react'
import { StandardProps, CommonEventFunction } from './common'
import { StandardProps, CommonEventFunction, BaseEventOrigFunction } from './common'

interface ScrollViewProps extends StandardProps {
/** 允许横向滚动
Expand Down Expand Up @@ -100,38 +100,38 @@ interface ScrollViewProps extends StandardProps {
/** 滚动到顶部/左边,会触发 scrolltoupper 事件
* @supported weapp, swan, alipay, tt, h5, rn
*/
onScrollToUpper?: (event: CommonEventFunction) => any
onScrollToUpper?: CommonEventFunction

/** 滚动到底部/右边,会触发 scrolltolower 事件
* @supported weapp, swan, alipay, tt, h5, rn
*/
onScrollToLower?: (event: CommonEventFunction) => any
onScrollToLower?: CommonEventFunction

/** 滚动时触发
* `event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}`
* @supported weapp, swan, alipay, tt, h5, rn
*/
onScroll?: (event: CommonEventFunction<ScrollViewProps.onScrollDetail>) => any
onScroll?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>

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

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

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

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

declare namespace ScrollViewProps {
Expand Down