feat: add bounces for list,scroller,nestedSlider,flowlayout

This commit is contained in:
pengfei.zhou
2021-04-30 14:32:53 +08:00
committed by osborn
parent e621db48b9
commit 6da8d5658b
22 changed files with 109 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ export class FlowLayout extends Superview {
@Property
scrollable?: boolean
@Property
bounces?: boolean
reset() {
this.cachedViews.clear()
this.itemCount = 0

View File

@@ -76,6 +76,9 @@ export class List extends Superview {
@Property
scrollable?: boolean
@Property
bounces?: boolean
scrollToItem(context: BridgeContext, index: number, config?: { animated?: boolean, }) {
const animated = config?.animated
return this.nativeChannel(context, 'scrollToItem')({ index, animated, }) as Promise<any>

View File

@@ -24,6 +24,9 @@ export class NestedSlider extends Group {
@Property
scrollable?: boolean
@Property
bounces?: boolean
addSlideItem(view: View) {
this.addChild(view)
}

View File

@@ -45,6 +45,9 @@ export class Scroller extends Superview {
@Property
scrollable?: boolean
@Property
bounces?: boolean
allSubviews() {
return [this.content]
}