import { Component, SFC } from 'react'; export interface RouterHelperState { routers: string[]; routerInfo: {}; activeRouteIdx: number; activeRoute: string; } export interface RouterHelperProps { maxRouters?: number; } declare const history: any; declare const changeRouteKey: (routeKey: any) => void; declare const pushToHistory: (url: any, params?: any) => void; declare const wrapPushUrl: (pushConfig: any) => string; /** * * @param {object} config { type: 'PUSH | GO_BACK | LINK', component: route, params: {} } */ declare const onNavigate: (config: any) => void; declare class RouterHelper

extends Component { history: any; wrapPushUrl: (pushConfig: any) => string; pushToHistory: (url: any, params?: any) => void; onNavigate: (config: any) => void; unlisten: any; constructor(props: any); componentDidMount(): void; changeRoute: (route: string, params: any) => void; handleHistory: (location: any, action: any) => void; closeAll: () => void; closeTab: (targetIdx: number) => void | { routers: any[]; routerInfo: S["routerInfo"]; activeRoute: any; activeRouteIdx: number; }; selectTab: (activeRoute: string, nextRouterState?: any) => void; initRoute: () => void; } export interface LinkProps { /** 将要导航到的路由 */ to: string; className?: string; onClick?: (event: any) => void; /** 作为 query string 的导航参数,例如 { ID: 123, name: alex } -> ID=123&name=alex */ params?: {}; isActive?: boolean; } /** * 用于导航到另外页面的组件 * @param {object} options 参数 */ declare const Link: SFC; export { RouterHelper, Link, history, wrapPushUrl, pushToHistory, changeRouteKey, onNavigate, };