UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

21 lines (20 loc) 549 B
/** * 根据路由跳转时的参数,提取 path 和其他参数 * @param route $router.push 或者 $router.replace 的参数 * @returns 解析结果 * @example * ```ts * getRouterFuncPath('/foo/bar'); * // { path: '/foo/bar', other: {} } * * getRouterFuncPath({ path: '/foo/bar', query: { a: 1 } }); * // { path: '/foo/bar', other: { query: { a: 1 } } } * * getRouterFuncPath({ name: 'home' }); * // { path: undefined, other: {} } * ``` */ export declare function getRouterFuncPath(route: any): { path: any; other: any; };