Interfaces
ParallelRouter
interface ParallelRouter extends Router {
// name of the parallel router
name?: string
// fallback settings
fallback: {
notFound: boolean
index: boolean
}
// check if the router has the path
hasPath: (path: string) => boolean
// try to push the path to the router
tryPush: (path: string, fallbackRedirect?: string) => ReturnType<Router['push']> | undefined
// sync the parallel router with the global router
sync: () => ReturnType<Router['push']> | undefined
// set sync enable
setSync: (sync: boolean) => void
}
ModalRouter
interface ModalRouter {
// similar to backgroundRoute but fallback to the useRoute() if undefined
route: Ref<RouteLocationNormalizedLoaded>
// the route of the background view of the modal
backgroundRoute: Ref<RouteLocationNormalizedLoaded | undefined>
// the opened stacks count of the modal view
stacks: Ref<number[] | undefined>
// method to close the modal routes
close: (allGroups?: boolean) => void
// method to push a new route to the modal
push: (to: RouteLocationRaw, open?: boolean) => ReturnType<Router['push']>
// method to replace the current route of the modal
replace: (to: RouteLocationRaw) => ReturnType<Router['replace']>
}
Table of Contents