This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/widget/flowlayout.d.ts

36 lines
1.1 KiB
TypeScript
Raw Normal View History

import { Stack } from './layouts';
import { Superview, View, NativeViewModel } from '../ui/view';
export declare class FlowLayoutItem extends Stack {
2020-01-03 14:44:51 +08:00
/**
* Set to reuse native view
*/
identifier?: string;
}
export declare class FlowLayout extends Superview {
2020-01-03 14:44:51 +08:00
private cachedViews;
allSubviews(): IterableIterator<FlowLayoutItem> | FlowLayoutItem[];
columnCount: number;
columnSpace?: number;
rowSpace?: number;
itemCount: number;
renderItem: (index: number) => FlowLayoutItem;
batchCount: number;
onLoadMore?: () => void;
loadMore?: boolean;
loadMoreView?: FlowLayoutItem;
onScroll?: (offset: {
x: number;
y: number;
}) => void;
onScrollEnd?: (offset: {
x: number;
y: number;
}) => void;
2020-01-03 14:44:51 +08:00
reset(): void;
private getItem;
private renderBunchedItems;
2020-01-03 16:35:04 +08:00
toModel(): NativeViewModel;
2020-01-03 14:44:51 +08:00
}
export declare function flowlayout(config: Partial<FlowLayout>): FlowLayout;
export declare function flowItem(item: View | View[], config?: Partial<FlowLayoutItem>): FlowLayoutItem;