feat:List add scrollToItem method

This commit is contained in:
pengfei.zhou
2020-04-22 11:18:21 +08:00
committed by osborn
parent 2541a13d74
commit 5f4942a8ff
12 changed files with 129 additions and 6 deletions

3
doric-js/index.d.ts vendored
View File

@@ -499,6 +499,7 @@ declare module 'doric/lib/src/widget/image' {
declare module 'doric/lib/src/widget/list' {
import { View, Superview, NativeViewModel } from "doric/lib/src/ui/view";
import { Stack } from "doric/lib/src/widget/layouts";
import { BridgeContext } from "doric/lib/src/runtime/global";
export class ListItem extends Stack {
/**
* Set to reuse native view
@@ -521,6 +522,8 @@ declare module 'doric/lib/src/widget/list' {
x: number;
y: number;
}) => void;
scrolledPosition?: number;
scrollToItem(context: BridgeContext, pos: number, animated?: boolean): Promise<any>;
reset(): void;
isDirty(): boolean;
toModel(): NativeViewModel;