/** * 查询字符串相关操作 */ import React from 'react'; import { RouteComponentProps } from 'react-router'; import QueryGetter from './QueryGetter'; export declare type QuerySetter = (key: string, value: any) => QuerySetter; export { QueryGetter }; export interface QueryContextValue { value: any; set(namespace: string, query: object, ...omited: string[]): void; set(query: object, ...omited: string[]): void; get(namespace?: string): any; setter(namespace?: string): QuerySetter; getter(namespace?: string): QueryGetter; clear(namespace?: string): void; } export interface QueryComponentProps { search: QueryContextValue; } interface Props extends RouteComponentProps<{}> { } interface State extends QueryComponentProps { rawSearch: string; } export declare const QueryContext: React.Context; export declare class Provider extends React.PureComponent { constructor(props: Props); static getDerivedStateFromProps(props: Props, state: State): { rawSearch: string; search: { value: any; set(namespace: string, query: object, ...omited: string[]): void; set(query: object, ...omited: string[]): void; get(namespace?: string | undefined): any; setter(namespace?: string | undefined): QuerySetter; getter(namespace?: string | undefined): QueryGetter; clear(namespace?: string | undefined): void; }; } | null; render(): JSX.Element; private clear; /** * 获取查询字符串 */ private getter; private get; private setter; /** * 设置查询字符串 */ private set; } export declare function getSearchParams(searchString: string): any; declare const _default: any; export default _default;