路由 API

    • setPath(path: string): void: S 设置路由中的路径。
    • get currentParams(): { [string: index]: string }: 返回当前路由的参数。
    • getRoute(id: string): RouteContext | undefined: 如果根据路由 id 能够匹配到路由,则返回 RouteContext。如果匹配不到,则返回 undefined
    • id: string: 路由 id
    • queryParams: { [index: string]: string }: 匹配到路由的查询参数。
    • : 匹配到路由的路径参数。
    • isExact(): boolean: 一个函数,指明路由是否与路径完全匹配。
    • isError(): boolean: 一个函数,指明路由是否与路径匹配错误。