@quanxi/ui
Version:
全悉组件库
19 lines (18 loc) • 819 B
TypeScript
export { useQuickFilterFn, useQuickFilterWithPageFn, writeQuickFilterToUrlFn };
interface UserQuickFilterWithPageProps<V extends Record<string, any>> {
key?: string;
condition?: V | (() => V);
pageSize?: number;
pageNum?: number;
}
type QuickFilterWithPageValue<V> = {
condition?: V;
pageSize?: number;
pageNum?: number;
};
declare function useQuickFilterWithPageFn<V extends Record<string, any>>(props?: UserQuickFilterWithPageProps<V>): [
QuickFilterWithPageValue<V>,
(params: QuickFilterWithPageValue<V>) => void
];
declare function useQuickFilterFn<V extends Record<string, any>>(defaultFilter?: V | (() => V), key?: string, newFilter?: V | (() => V)): [V, (filter: V) => void];
declare function writeQuickFilterToUrlFn(key: string, filter: QuickFilterWithPageValue<any>): void;