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

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-01-03 14:44:51 +08:00
import { Stack } from './layouts';
2020-01-03 16:35:04 +08:00
import { IView, Superview, View, NativeViewModel } from '../ui/view';
2020-01-03 14:44:51 +08:00
export declare class FlowLayoutItem extends Stack {
/**
* Set to reuse native view
*/
identifier?: string;
}
export interface IFlowLayout extends IView {
renderItem: (index: number) => FlowLayoutItem;
itemCount: number;
batchCount?: number;
columnCount?: number;
columnSpace?: number;
rowSpace?: number;
}
export declare class FlowLayout extends Superview implements IFlowLayout {
private cachedViews;
private ignoreDirtyCallOnce;
allSubviews(): IterableIterator<FlowLayoutItem> | FlowLayoutItem[];
columnCount: number;
columnSpace?: number;
rowSpace?: number;
itemCount: number;
renderItem: (index: number) => FlowLayoutItem;
batchCount: number;
onLoadMore?: () => void;
loadMore?: boolean;
loadMoreView?: FlowLayoutItem;
reset(): void;
private getItem;
isDirty(): boolean;
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: IFlowLayout): FlowLayout;
export declare function flowItem(item: View): FlowLayoutItem;