update js api

This commit is contained in:
pengfei.zhou
2020-04-22 11:37:43 +08:00
committed by osborn
parent 8214e50f79
commit 229fc41de3
9 changed files with 15 additions and 15 deletions

View File

@@ -26,7 +26,7 @@ export declare class List extends Superview {
y: number;
}) => void;
scrolledPosition?: number;
scrollToItem(context: BridgeContext, pos: number, config?: {
scrollToItem(context: BridgeContext, index: number, config?: {
animated?: boolean;
}): Promise<any>;
reset(): void;

View File

@@ -47,10 +47,10 @@ export class List extends Superview {
return this.cachedViews.values();
}
}
scrollToItem(context, pos, config) {
scrollToItem(context, index, config) {
var _a;
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
}
reset() {
this.cachedViews.clear();