getPagination

This commit is contained in:
Xu Chang 2022-09-30 16:48:40 +08:00
parent 7868f08c6b
commit fc5e362d40
4 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ export declare class Cache<ED extends EntityDict & BaseEntityDict, Cxt extends C
operation: ED[keyof ED]['Operation'];
}>): Promise<SelectionResult<ED[T]["Schema"], S["data"]>>;
get<T extends keyof ED, S extends ED[T]['Selection']>(entity: T, selection: S, params?: SelectOption): Promise<import("oak-domain/lib/types").SelectRowShape<ED[T]["Schema"], S["data"]>[]>;
judgeRelation(entity: keyof ED, attr: string): string | 0 | 2 | 1 | string[];
judgeRelation(entity: keyof ED, attr: string): string | 0 | 1 | string[] | 2;
bindOnSync(callback: (opRecords: OpRecord<ED>[]) => Promise<void>): void;
unbindOnSync(callback: (opRecords: OpRecord<ED>[]) => Promise<void>): void;
getCachedData(): { [T in keyof ED]?: ED[T]["OpSchema"][] | undefined; };

View File

@ -37,7 +37,7 @@ declare abstract class Node<ED extends EntityDict & BaseEntityDict, T extends ke
getBeforeExecute(): ((updateData: import("oak-domain/lib/types").DeduceUpdateOperationData<ED[T]["OpSchema"]>, action: ED[T]["Action"]) => Promise<void>) | undefined;
getAfterExecute(): ((updateData: import("oak-domain/lib/types").DeduceUpdateOperationData<ED[T]["OpSchema"]>, action: ED[T]["Action"]) => Promise<void>) | undefined;
destroy(): void;
protected judgeRelation(attr: string): string | 0 | 2 | 1 | string[];
protected judgeRelation(attr: string): string | 0 | 1 | string[] | 2;
protected contains(filter: ED[T]['Selection']['filter'], conditionalFilter: ED[T]['Selection']['filter']): boolean;
protected repel(filter1: ED[T]['Selection']['filter'], filter2: ED[T]['Selection']['filter']): boolean;
}

2
lib/types/Page.d.ts vendored
View File

@ -176,7 +176,7 @@ export declare type OakListComponentMethods<ED extends EntityDict & BaseEntityDi
addNamedSorter: (filter: NamedSorterItem<ED, T>, refresh?: boolean) => Promise<void>;
removeNamedSorter: (filter: NamedSorterItem<ED, T>, refresh?: boolean) => Promise<void>;
removeNamedSorterByName: (name: string, refresh?: boolean) => Promise<void>;
getPagination: () => void;
getPagination: () => Pagination | undefined;
setPageSize: (pageSize: number) => void;
setCurrentPage: (current: number) => void;
};

View File

@ -317,7 +317,7 @@ export type OakListComponentMethods<ED extends EntityDict & BaseEntityDict, T ex
refresh?: boolean
) => Promise<void>;
removeNamedSorterByName: (name: string, refresh?: boolean) => Promise<void>;
getPagination: () => void;
getPagination: () => Pagination | undefined;
setPageSize: (pageSize: number) => void;
setCurrentPage: (current: number) => void;
};