s-uni-router
Version:
一个uni-app 路由管理解决方案
26 lines (24 loc) • 996 B
TypeScript
import { onGuards, BeforeEachGuardsReturn, NavigateNamesType, RouterLocation } from './types';
export declare class RouterGuardsEvent {
event: {
afterEach: Array<onGuards>;
beforeEach: Array<onGuards<BeforeEachGuardsReturn>>;
};
beforeEach(callback: onGuards<BeforeEachGuardsReturn>): () => void;
afterEach(callback: onGuards): () => void;
}
export declare class RouterGuards extends RouterGuardsEvent {
currentRouterPath: import('vue').ShallowRef<(RouterLocation & {
fullPath: string;
}) | null>;
isReady: import('vue').Ref<boolean>;
pendingLocation: null | string;
constructor();
private updateRouter;
fixRouterPath(): import('vue').ShallowRef<(RouterLocation & {
fullPath: string;
}) | null> | undefined;
navigate(to: RouterLocation, navigateName?: NavigateNamesType): Promise<void>;
navigateTemp(to: RouterLocation, callback?: () => void): Promise<void>;
ready(to: RouterLocation): Promise<void>;
}