https://github.com/react-component/m-pull-to-refresh
文档和实际声明类型没有对应上
normal
Type '{ damping: number; refreshing: boolean | undefined; onRefresh: () => void; }' is missing the following properties from type 'Pick
| Environment | Info |
|---|---|
| antd | 2.2.6 |
| React | latest |
| System | windows |
| Browser | chrome |
我也有相同的问题,请问一下,解决了吗??
用ts的时候,加上
pullToRefresh={
onRefresh={this.onRefresh}
/>
}
就会报错
pullToRefresh={
getScrollContainer={() => {
return ''
}}
direction={'down'} //刷新方式,默认为下拉
distanceToRefresh={window.devicePixelRatio * 25} //下拉多少距离刷新
refreshing={this.state.refreshing} //是否在刷新状态
onRefresh={this.onRefresh} //视图刷新时调用函数
damping={100} //能往下拉的距离
indicator={{
//指示配置
activate: '释放立即刷新',
deactivate: '下拉刷新',
release: '您的货物来啦...',
finish: '请开始您的表演吧'
}}
/>
}
Most helpful comment
pullToRefresh={
//选择容器
getScrollContainer={() => {
return ''
}}
direction={'down'} //刷新方式,默认为下拉
distanceToRefresh={window.devicePixelRatio * 25} //下拉多少距离刷新
refreshing={this.state.refreshing} //是否在刷新状态
onRefresh={this.onRefresh} //视图刷新时调用函数
damping={100} //能往下拉的距离
indicator={{
//指示配置
activate: '释放立即刷新',
deactivate: '下拉刷新',
release: '您的货物来啦...',
finish: '请开始您的表演吧'
}}
/>
}