You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This method queues a callback to be called when the router has completed the initial navigation, which means it has resolved all async enter hooks and async components that are associated with the initial route.
136
+
* This method queues a callback to be called when the router has completed the initial navigation, which means it has
137
+
* resolved all async enter hooks and async components that are associated with the initial route.
145
138
*
146
139
* This is useful in server-side rendering to ensure consistent output on both the server and the client.
147
140
* @param cb onReady callback.
148
-
* @param errorCb errorCb will be called when the initial route resolution runs into an error (e.g. failed to resolve an async component).
141
+
* @param errorCb errorCb will be called when the initial route resolution runs into an error (e.g. failed to resolve
* Adds an error handler that is called every time a non caught error happens
153
-
* during navigation. This includes errors thrown synchronously and
154
-
* asynchronously, errors returned or passed to `next` in any navigation
155
-
* guard, and errors occurred when trying to resolve an async component that
156
-
* is required to render a route.
146
+
* Adds an error handler that is called every time a non caught error happens during navigation. This includes errors
147
+
* thrown synchronously and asynchronously, errors returned or passed to `next` in any navigation guard, and errors
148
+
* occurred when trying to resolve an async component that is required to render a route.
157
149
*
158
150
* @param handler - error handler to register
159
151
*/
@@ -163,14 +155,16 @@ export declare class VueRouter {
163
155
*/
164
156
addRoutes(routes: RouteConfig[]): void
165
157
/**
166
-
* Add a new {@link RouteConfig | route record} as the child of an existing route. If the route has a `name` and there is already an existing one with the same one, it overwrites it.
158
+
* Add a new {@link RouteConfig | route record} as the child of an existing route. If the route has a `name` and there
159
+
* is already an existing one with the same one, it overwrites it.
167
160
*
168
161
* @param parentName - Parent Route Record where `route` should be appended at
* Add a new {@link RouteConfig | route} to the router. If the route has a `name` and there is already an existing one with the same one, it overwrites it.
166
+
* Add a new {@link RouteConfig | route} to the router. If the route has a `name` and there is already an existing one
* default: `"hash"` (in browser) | `"abstract"` (in Node.js)
282
276
*
283
277
* available values: `"hash" | "history" | "abstract"`
284
-
* - `"hash"`: uses the URL hash for routing. Works in all Vue-supported browsers, including those that do not support HTML5 History API.
278
+
* - `"hash"`: uses the URL hash for routing. Works in all Vue-supported browsers, including those that do not support
279
+
* HTML5 History API.
285
280
* - `"history"`: requires HTML5 History API and server config. See HTML5 History Mode.
286
-
* - `"abstract"`: works in all JavaScript environments, e.g. server-side with Node.js. **The router will automatically be forced into this mode if no browser API is present.**
281
+
* - `"abstract"`: works in all JavaScript environments, e.g. server-side with Node.js. **The router will
282
+
* automatically be forced into this mode if no browser API is present.**
* Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.
417
+
* Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()`
418
+
* internally, so the value can be either a string or a location descriptor object.
420
419
*/
421
420
to: string|Location
422
421
/**
423
-
* Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record.
422
+
* Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will
423
+
* not leave a history record.
424
424
*
425
425
* @default false
426
426
*/
427
427
replace?: boolean
428
428
/**
429
-
* Setting `append` prop always appends the relative path to the current path. For example, assuming we are navigating from `/a` to a relative link `b`, without `append` we will end up at `/b`, but with append we will end up at `/a/b`.
429
+
* Setting `append` prop always appends the relative path to the current path. For example, assuming we are navigating
430
+
* from `/a` to a relative link `b`, without `append` we will end up at `/b`, but with append we will end up at
431
+
* `/a/b`.
430
432
*
431
433
* @default false
432
434
*/
433
435
append?: boolean
434
436
/**
435
-
* Sometimes we want <RouterLink> to render as another tag, e.g <li>. Then we can use tag prop to specify which tag to render to, and it will still listen to click events for navigation.
437
+
* Sometimes we want <RouterLink> to render as another tag, e.g <li>. Then we can use tag prop to specify which tag to
438
+
* render to, and it will still listen to click events for navigation.
436
439
*
437
440
* @default "a"
438
441
*/
439
442
tag?: string
440
443
/**
441
-
* Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option.
444
+
* Configure the active CSS class applied when the link is active. Note the default value can also be configured
445
+
* globally via the `linkActiveClass` router constructor option.
442
446
*
443
447
* @default "router-link-active"
444
448
*/
445
449
activeClass?: string
446
450
/**
447
-
* The default active class matching behavior is **inclusive match**. For example, `<RouterLink to="/a">` will get this class applied as long as the current path starts with `/a/` or is `/a`.
451
+
* The default active class matching behavior is **inclusive match**. For example, `<RouterLink to="/a">` will get
452
+
* this class applied as long as the current path starts with `/a/` or is `/a`.
* Configure the active CSS class applied when the link is active with exact path match. Note the default value can also be configured globally via the `linkExactPathActiveClass` router constructor option.
464
+
* Configure the active CSS class applied when the link is active with exact path match. Note the default value can
465
+
* also be configured globally via the `linkExactPathActiveClass` router constructor option.
* Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option.
478
+
* Configure the active CSS class applied when the link is active with exact match. Note the default value can also be
479
+
* configured globally via the `linkExactActiveClass` router constructor option.
473
480
*
474
481
* @default "router-link-exact-active"
475
482
*/
476
483
exactActiveClass?: string
477
484
/**
478
-
* Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for [aria-current](https://www.w3.org/TR/wai-aria-1.2/#aria-current) in the ARIA spec. In most cases, the default of page should be the best fit.
485
+
* Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed
486
+
* values for [aria-current](https://www.w3.org/TR/wai-aria-1.2/#aria-current) in the ARIA spec. In most cases, the
* When a {@link RouterView | `<RouterView />`} has a name, it will render the component with the corresponding name in the matched route record's components option. See [Named Views](https://v3.router.vuejs.org/guide/essentials/named-views.html) for an example.
545
+
* When a {@link RouterView | `<RouterView />`} has a name, it will render the component with the corresponding name
546
+
* in the matched route record's components option. See [Named
547
+
* Views](https://v3.router.vuejs.org/guide/essentials/named-views.html) for an example.
0 commit comments