feat:Pullable return pulling distance

This commit is contained in:
pengfei.zhou
2019-12-02 21:01:34 +08:00
parent 35fe6c41d5
commit 2e96912a99
12 changed files with 83 additions and 58 deletions

View File

@@ -62,13 +62,13 @@ export function refreshable(config: IRefreshable) {
export interface IPullable {
startAnimation(): void
stopAnimation(): void
setProgressRotation(rotation: number): void
setPullingDistance(distance: number): void
}
export function pullable(context: BridgeContext, v: View, config: IPullable) {
Reflect.set(v, 'startAnimation', config.startAnimation)
Reflect.set(v, 'stopAnimation', config.stopAnimation)
Reflect.set(v, 'setProgressRotation', config.setProgressRotation)
Reflect.set(v, 'setPullingDistance', config.setPullingDistance)
return v
}