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
2021-04-30 14:58:30 +08:00

41 lines
1.2 KiB
TypeScript

import { Stack } from './layouts';
import { Superview, View, NativeViewModel } from '../ui/view';
export declare class FlowLayoutItem extends Stack {
/**
* Set to reuse native view
*/
identifier?: string;
}
export declare class FlowLayout extends Superview {
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;
scrollable?: boolean;
/**
* Take effect only on iOS
*/
bounces?: boolean;
reset(): void;
private getItem;
private renderBunchedItems;
toModel(): NativeViewModel;
}
export declare function flowlayout(config: Partial<FlowLayout>): FlowLayout;
export declare function flowItem(item: View | View[], config?: Partial<FlowLayoutItem>): FlowLayoutItem;