Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for declaring custom options.

example
declare module '@vue/runtime-core' {
interface ComponentCustomOptions {
beforeRouteUpdate?(
to: Route,
from: Route,
next: () => void
): void
}
}

Hierarchy

Index

Properties

Optional beforeRouteEnter

beforeRouteEnter?: NavigationGuardWithThis<undefined>

Guard called when the router is navigating to the route that is rendering this component from a different route. Differently from beforeRouteUpdate and beforeRouteLeave, beforeRouteEnter does not have access to the component instance through this because it triggers before the component is even mounted.

param to

RouteLocationRaw we are navigating to

param from

RouteLocationRaw we are navigating from

param next

function to validate, cancel or modify (by redirecting) the navigation

Optional beforeRouteLeave

beforeRouteLeave?: NavigationGuard

Guard called when the router is navigating away from the current route that is rendering this component.

param to

RouteLocationRaw we are navigating to

param from

RouteLocationRaw we are navigating from

param next

function to validate, cancel or modify (by redirecting) the navigation

Optional beforeRouteUpdate

beforeRouteUpdate?: NavigationGuard

Guard called whenever the route that renders this component has changed but it is reused for the new route. This allows you to guard for changes in params, the query or the hash.

param to

RouteLocationRaw we are navigating to

param from

RouteLocationRaw we are navigating from

param next

function to validate, cancel or modify (by redirecting) the navigation

Generated using TypeDoc