feat:scroller add onScroll and onScrollEnd property
This commit is contained in:
@@ -35,6 +35,10 @@ export abstract class ViewModel<M extends Object, V extends ViewHolder> {
|
||||
return this.state
|
||||
}
|
||||
|
||||
getViewHolder() {
|
||||
return this.viewHolder;
|
||||
}
|
||||
|
||||
updateState(setter: Setter<M>) {
|
||||
setter(this.state)
|
||||
this.onBind(this.state, this.viewHolder)
|
||||
|
@@ -40,6 +40,12 @@ export class Scroller extends Superview implements IScroller {
|
||||
@Property
|
||||
contentOffset?: { x: number, y: number }
|
||||
|
||||
@Property
|
||||
onScroll?: (offset: { x: number, y: number }) => void
|
||||
|
||||
@Property
|
||||
onScrollEnd?: (offset: { x: number, y: number }) => void
|
||||
|
||||
allSubviews() {
|
||||
return [this.content]
|
||||
}
|
||||
|
Reference in New Issue
Block a user