docs: add initial documentation for router composables (#8895)

This commit is contained in:
Daniel Roe 2022-11-10 15:07:47 +01:00 committed by GitHub
parent e6351349c0
commit 3dd9271c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
---
title: "onBeforeRouteLeave"
description: The onBeforeRouteLeave composable allows registering a route guard within a component.
---
# `onBeforeRouteLeave`
The `onBeforeRouteLeave` composable adds a navigation guard that triggers whenever the component for the current location is about to be left.
::ReadMore{link="https://router.vuejs.org/api/index.html#onbeforerouteleave"}
::

View File

@ -0,0 +1,11 @@
---
title: "onBeforeRouteUpdate"
description: The onBeforeRouteUpdate composable allows registering a route guard within a component.
---
# `onBeforeRouteUpdate`
The `onBeforeRouteUpdate` composable adds a navigation guard that triggers whenever the component for the current location is about to be updated.
::ReadMore{link="https://router.vuejs.org/api/index.html#onbeforerouteupdate"}
::