feat:slider and flowlayout add reload api
This commit is contained in:
parent
3de2162ef6
commit
cce4148240
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package pub.doric.shader.flowlayout;
|
package pub.doric.shader.flowlayout;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@ -393,6 +394,23 @@ public class FlowLayoutNode extends SuperNode<RecyclerView> implements IDoricScr
|
|||||||
return jsonArray;
|
return jsonArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DoricMethod
|
||||||
|
public void reload() {
|
||||||
|
this.flowAdapter.loadAnchor = -1;
|
||||||
|
// If reload,should reset native cache.
|
||||||
|
for (int index = 0; index < this.flowAdapter.itemValues.size(); index++) {
|
||||||
|
removeSubModel(this.flowAdapter.itemValues.valueAt(index));
|
||||||
|
}
|
||||||
|
this.flowAdapter.itemValues.clear();
|
||||||
|
mView.post(new Runnable() {
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
flowAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
super.reset();
|
super.reset();
|
||||||
|
@ -295,6 +295,21 @@ public class SliderNode extends SuperNode<RecyclerView> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@DoricMethod
|
||||||
|
public void reload() {
|
||||||
|
slideAdapter.itemValues.clear();
|
||||||
|
clearSubModel();
|
||||||
|
mView.post(new Runnable() {
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
slideAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
super.reset();
|
super.reset();
|
||||||
|
@ -549,4 +549,15 @@ - (void)subNodeContentChanged:(DoricViewNode *)subNode {
|
|||||||
[subNode.view.doricLayout apply];
|
[subNode.view.doricLayout apply];
|
||||||
[super subNodeContentChanged:subNode];
|
[super subNodeContentChanged:subNode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)reload {
|
||||||
|
self.loadAnchor = -1;
|
||||||
|
[self.itemViewIds.allValues forEach:^(NSString *obj) {
|
||||||
|
[self removeSubModel:obj];
|
||||||
|
}];
|
||||||
|
[self.itemViewIds removeAllObjects];
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[self.view reloadData];
|
||||||
|
});
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -358,4 +358,12 @@ - (void)subNodeContentChanged:(DoricViewNode *)subNode {
|
|||||||
[subNode.view.doricLayout apply];
|
[subNode.view.doricLayout apply];
|
||||||
[super subNodeContentChanged:subNode];
|
[super subNodeContentChanged:subNode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)reload {
|
||||||
|
[self.itemViewIds removeAllObjects];
|
||||||
|
[self clearSubModel];
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[self.view reloadData];
|
||||||
|
});
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -2503,13 +2503,18 @@ var List = /** @class */ (function (_super) {
|
|||||||
List.prototype.findCompletelyVisibleItems = function (context) {
|
List.prototype.findCompletelyVisibleItems = function (context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
List.prototype.reload = function (context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
};
|
||||||
List.prototype.reset = function () {
|
List.prototype.reset = function () {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
};
|
};
|
||||||
List.prototype.reload = function (context) {
|
|
||||||
return this.nativeChannel(context, 'reload')();
|
|
||||||
};
|
|
||||||
List.prototype.getItem = function (itemIdx) {
|
List.prototype.getItem = function (itemIdx) {
|
||||||
var view = this.renderItem(itemIdx);
|
var view = this.renderItem(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -2660,6 +2665,18 @@ var Slider = /** @class */ (function (_super) {
|
|||||||
Slider.prototype.allSubviews = function () {
|
Slider.prototype.allSubviews = function () {
|
||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
Slider.prototype.reload = function (context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
};
|
||||||
|
Slider.prototype.reset = function () {
|
||||||
|
this.cachedViews.clear();
|
||||||
|
this.itemCount = 0;
|
||||||
|
};
|
||||||
Slider.prototype.getItem = function (itemIdx) {
|
Slider.prototype.getItem = function (itemIdx) {
|
||||||
var view = this.renderPage(itemIdx);
|
var view = this.renderPage(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -3160,6 +3177,14 @@ var FlowLayout = /** @class */ (function (_super) {
|
|||||||
FlowLayout.prototype.findCompletelyVisibleItems = function (context) {
|
FlowLayout.prototype.findCompletelyVisibleItems = function (context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
FlowLayout.prototype.reload = function (context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
};
|
||||||
FlowLayout.prototype.reset = function () {
|
FlowLayout.prototype.reset = function () {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
@ -1889,13 +1889,18 @@ class List extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
}
|
}
|
||||||
reload(context) {
|
|
||||||
return this.nativeChannel(context, 'reload')();
|
|
||||||
}
|
|
||||||
getItem(itemIdx) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderItem(itemIdx);
|
let view = this.renderItem(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -2022,6 +2027,18 @@ class Slider extends Superview {
|
|||||||
allSubviews() {
|
allSubviews() {
|
||||||
return this.cachedViews.values();
|
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) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderPage(itemIdx);
|
let view = this.renderPage(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -2397,6 +2414,14 @@ class FlowLayout extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
@ -3419,13 +3419,18 @@ class List extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
}
|
}
|
||||||
reload(context) {
|
|
||||||
return this.nativeChannel(context, 'reload')();
|
|
||||||
}
|
|
||||||
getItem(itemIdx) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderItem(itemIdx);
|
let view = this.renderItem(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -3552,6 +3557,18 @@ class Slider extends Superview {
|
|||||||
allSubviews() {
|
allSubviews() {
|
||||||
return this.cachedViews.values();
|
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) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderPage(itemIdx);
|
let view = this.renderPage(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -3927,6 +3944,14 @@ class FlowLayout extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
20
doric-js/index.d.ts
vendored
20
doric-js/index.d.ts
vendored
@ -1039,8 +1039,13 @@ declare module "doric" {
|
|||||||
* @returns Returns array of completely visible view's index.
|
* @returns Returns array of completely visible view's index.
|
||||||
*/
|
*/
|
||||||
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
||||||
reset(): void;
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
reload(context: BridgeContext): Promise<void>;
|
reload(context: BridgeContext): Promise<void>;
|
||||||
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
toModel(): NativeViewModel;
|
toModel(): NativeViewModel;
|
||||||
@ -1075,6 +1080,13 @@ declare module "doric" {
|
|||||||
minScale: number;
|
minScale: number;
|
||||||
maxScale: number;
|
maxScale: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context: BridgeContext): Promise<void>;
|
||||||
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
|
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
|
||||||
@ -1182,6 +1194,12 @@ declare module "doric" {
|
|||||||
* @returns Returns array of completely visible view's index.
|
* @returns Returns array of completely visible view's index.
|
||||||
*/
|
*/
|
||||||
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context: BridgeContext): Promise<void>;
|
||||||
reset(): void;
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
|
6
doric-js/lib/src/widget/flowlayout.d.ts
vendored
6
doric-js/lib/src/widget/flowlayout.d.ts
vendored
@ -47,6 +47,12 @@ export declare class FlowLayout extends Superview {
|
|||||||
* @returns Returns array of completely visible view's index.
|
* @returns Returns array of completely visible view's index.
|
||||||
*/
|
*/
|
||||||
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context: BridgeContext): Promise<void>;
|
||||||
reset(): void;
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
|
@ -64,6 +64,14 @@ export class FlowLayout extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
7
doric-js/lib/src/widget/list.d.ts
vendored
7
doric-js/lib/src/widget/list.d.ts
vendored
@ -53,8 +53,13 @@ export declare class List extends Superview {
|
|||||||
* @returns Returns array of completely visible view's index.
|
* @returns Returns array of completely visible view's index.
|
||||||
*/
|
*/
|
||||||
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
findCompletelyVisibleItems(context: BridgeContext): Promise<number[]>;
|
||||||
reset(): void;
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
reload(context: BridgeContext): Promise<void>;
|
reload(context: BridgeContext): Promise<void>;
|
||||||
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
toModel(): NativeViewModel;
|
toModel(): NativeViewModel;
|
||||||
|
@ -67,13 +67,18 @@ export class List extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
}
|
}
|
||||||
reload(context) {
|
|
||||||
return this.nativeChannel(context, 'reload')();
|
|
||||||
}
|
|
||||||
getItem(itemIdx) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderItem(itemIdx);
|
let view = this.renderItem(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
|
7
doric-js/lib/src/widget/slider.d.ts
vendored
7
doric-js/lib/src/widget/slider.d.ts
vendored
@ -29,6 +29,13 @@ export declare class Slider extends Superview {
|
|||||||
minScale: number;
|
minScale: number;
|
||||||
maxScale: number;
|
maxScale: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context: BridgeContext): Promise<void>;
|
||||||
|
reset(): void;
|
||||||
private getItem;
|
private getItem;
|
||||||
private renderBunchedItems;
|
private renderBunchedItems;
|
||||||
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
|
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
|
||||||
|
@ -41,6 +41,18 @@ export class Slider extends Superview {
|
|||||||
allSubviews() {
|
allSubviews() {
|
||||||
return this.cachedViews.values();
|
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) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderPage(itemIdx);
|
let view = this.renderPage(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
|
@ -100,6 +100,14 @@ export class FlowLayout extends Superview {
|
|||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')() as Promise<number[]>
|
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() {
|
reset() {
|
||||||
this.cachedViews.clear()
|
this.cachedViews.clear()
|
||||||
|
@ -112,15 +112,20 @@ export class List extends Superview {
|
|||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')() as Promise<number[]>
|
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() {
|
reset() {
|
||||||
this.cachedViews.clear()
|
this.cachedViews.clear()
|
||||||
this.itemCount = 0
|
this.itemCount = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
reload(context: BridgeContext) {
|
|
||||||
return this.nativeChannel(context, 'reload')() as Promise<void>
|
|
||||||
}
|
|
||||||
|
|
||||||
private getItem(itemIdx: number) {
|
private getItem(itemIdx: number) {
|
||||||
let view = this.renderItem(itemIdx)
|
let view = this.renderItem(itemIdx)
|
||||||
view.superview = this
|
view.superview = this
|
||||||
|
@ -63,6 +63,20 @@ export class Slider extends Superview {
|
|||||||
@Property
|
@Property
|
||||||
slideStyle?: "zoomOut" | { type: "zoomOut", minScale: number, maxScale: number }
|
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) {
|
private getItem(itemIdx: number) {
|
||||||
let view = this.renderPage(itemIdx)
|
let view = this.renderPage(itemIdx)
|
||||||
view.superview = this
|
view.superview = this
|
||||||
|
31
doric-web/dist/index.js
vendored
31
doric-web/dist/index.js
vendored
@ -3496,13 +3496,18 @@ class List extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
}
|
}
|
||||||
reload(context) {
|
|
||||||
return this.nativeChannel(context, 'reload')();
|
|
||||||
}
|
|
||||||
getItem(itemIdx) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderItem(itemIdx);
|
let view = this.renderItem(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -3629,6 +3634,18 @@ class Slider extends Superview {
|
|||||||
allSubviews() {
|
allSubviews() {
|
||||||
return this.cachedViews.values();
|
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) {
|
getItem(itemIdx) {
|
||||||
let view = this.renderPage(itemIdx);
|
let view = this.renderPage(itemIdx);
|
||||||
view.superview = this;
|
view.superview = this;
|
||||||
@ -4004,6 +4021,14 @@ class FlowLayout extends Superview {
|
|||||||
findCompletelyVisibleItems(context) {
|
findCompletelyVisibleItems(context) {
|
||||||
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Reload all list items.
|
||||||
|
* @param context
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
reload(context) {
|
||||||
|
return this.nativeChannel(context, 'reload')();
|
||||||
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user