feat:slider and flowlayout add reload api

This commit is contained in:
pengfei.zhou
2022-08-16 17:57:51 +08:00
committed by osborn
parent 3de2162ef6
commit cce4148240
19 changed files with 262 additions and 22 deletions

View File

@@ -3496,13 +3496,18 @@ class List extends Superview {
findCompletelyVisibleItems(context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
}
/**
* Reload all list items.
* @param context
* @returns
*/
reload(context) {
return this.nativeChannel(context, 'reload')();
}
reset() {
this.cachedViews.clear();
this.itemCount = 0;
}
reload(context) {
return this.nativeChannel(context, 'reload')();
}
getItem(itemIdx) {
let view = this.renderItem(itemIdx);
view.superview = this;
@@ -3629,6 +3634,18 @@ class Slider extends Superview {
allSubviews() {
return this.cachedViews.values();
}
/**
* Reload all list items.
* @param context
* @returns
*/
reload(context) {
return this.nativeChannel(context, 'reload')();
}
reset() {
this.cachedViews.clear();
this.itemCount = 0;
}
getItem(itemIdx) {
let view = this.renderPage(itemIdx);
view.superview = this;
@@ -4004,6 +4021,14 @@ class FlowLayout extends Superview {
findCompletelyVisibleItems(context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
}
/**
* Reload all list items.
* @param context
* @returns
*/
reload(context) {
return this.nativeChannel(context, 'reload')();
}
reset() {
this.cachedViews.clear();
this.itemCount = 0;

File diff suppressed because one or more lines are too long