feat:slider and flowlayout add reload api
This commit is contained in:
@@ -100,6 +100,14 @@ export class FlowLayout extends Superview {
|
||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')() as Promise<number[]>
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload all list items.
|
||||
* @param context
|
||||
* @returns
|
||||
*/
|
||||
reload(context: BridgeContext) {
|
||||
return this.nativeChannel(context, 'reload')() as Promise<void>
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.cachedViews.clear()
|
||||
|
@@ -112,15 +112,20 @@ export class List extends Superview {
|
||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')() as Promise<number[]>
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload all list items.
|
||||
* @param context
|
||||
* @returns
|
||||
*/
|
||||
reload(context: BridgeContext) {
|
||||
return this.nativeChannel(context, 'reload')() as Promise<void>
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.cachedViews.clear()
|
||||
this.itemCount = 0
|
||||
}
|
||||
|
||||
reload(context: BridgeContext) {
|
||||
return this.nativeChannel(context, 'reload')() as Promise<void>
|
||||
}
|
||||
|
||||
private getItem(itemIdx: number) {
|
||||
let view = this.renderItem(itemIdx)
|
||||
view.superview = this
|
||||
|
@@ -63,6 +63,20 @@ export class Slider extends Superview {
|
||||
@Property
|
||||
slideStyle?: "zoomOut" | { type: "zoomOut", minScale: number, maxScale: number }
|
||||
|
||||
/**
|
||||
* Reload all list items.
|
||||
* @param context
|
||||
* @returns
|
||||
*/
|
||||
reload(context: BridgeContext) {
|
||||
return this.nativeChannel(context, 'reload')() as Promise<void>
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.cachedViews.clear()
|
||||
this.itemCount = 0
|
||||
}
|
||||
|
||||
private getItem(itemIdx: number) {
|
||||
let view = this.renderPage(itemIdx)
|
||||
view.superview = this
|
||||
|
Reference in New Issue
Block a user