js: list add canDrag, onDraging & onDraged

This commit is contained in:
王劲鹏
2022-06-17 15:43:51 +08:00
committed by osborn
parent fc94230df2
commit 1e7637a1dc
11 changed files with 4683 additions and 2670 deletions

View File

@@ -81,6 +81,15 @@ export class List extends Superview {
@Property
bounces?: boolean
@Property
canDrag?: boolean
@Property
onDragging?: (from: number, to: number) => void
@Property
onDragged?: (from: number, to: number) => void
scrollToItem(context: BridgeContext, index: number, config?: { animated?: boolean, }) {
const animated = config?.animated
return this.nativeChannel(context, 'scrollToItem')({ index, animated, }) as Promise<any>