From: Daniel Kelly Date: Tue, 15 Jun 2021 18:17:04 +0000 (-0500) Subject: docs: add 4 Vue School links to docs (#1001) X-Git-Tag: v4.0.9~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a49752846ad86d5ae5e63a7bd71edd609f7cc348;p=thirdparty%2Fvuejs%2Frouter.git docs: add 4 Vue School links to docs (#1001) --- diff --git a/docs/guide/advanced/composition-api.md b/docs/guide/advanced/composition-api.md index c0b41d6a..18a0654e 100644 --- a/docs/guide/advanced/composition-api.md +++ b/docs/guide/advanced/composition-api.md @@ -1,5 +1,10 @@ # Vue Router and the Composition API + + The introduction of `setup` and Vue's [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html), open up new possibilities but to be able to get the full potential out of Vue Router, we will need to use a few new functions to replace access to `this` and in-component navigation guards. ## Accessing the Router and current Route inside `setup` diff --git a/docs/guide/advanced/extending-router-link.md b/docs/guide/advanced/extending-router-link.md index 592e079d..1603a2fd 100644 --- a/docs/guide/advanced/extending-router-link.md +++ b/docs/guide/advanced/extending-router-link.md @@ -1,5 +1,10 @@ # Extending RouterLink + + The RouterLink component exposes enough `props` to suffice most basic applications but it doesn't try to cover every possible use case and you will likely find yourself using `v-slot` for some advanced cases. In most medium to large sized applications, it's worth creating one if not multiple custom RouterLink components to reuse them across your application. Some examples are Links in a Navigation Menu, handling external links, adding an `inactive-class`, etc. Let's extend RouterLink to handle external links as well and adding a custom `inactive-class` in an `AppLink.vue` file: diff --git a/docs/guide/advanced/meta.md b/docs/guide/advanced/meta.md index 1f55f485..869178db 100644 --- a/docs/guide/advanced/meta.md +++ b/docs/guide/advanced/meta.md @@ -1,5 +1,10 @@ # Route Meta Fields + + Sometimes, you might want to attach arbitrary information to routes like transition names, who can access the route, etc. This can be achieved through the `meta` property which accepts an object of properties and can be accessed on the route location and navigation guards. You can define `meta` properties like this: ```js diff --git a/docs/guide/advanced/scroll-behavior.md b/docs/guide/advanced/scroll-behavior.md index c5fc0506..32746c19 100644 --- a/docs/guide/advanced/scroll-behavior.md +++ b/docs/guide/advanced/scroll-behavior.md @@ -1,5 +1,10 @@ # Scroll Behavior + + When using client-side routing, we may want to scroll to top when navigating to a new route, or preserve the scrolling position of history entries just like real page reload does. Vue Router allows you to achieve these and even better, allows you to completely customize the scroll behavior on route navigation. **Note: this feature only works if the browser supports `history.pushState`.**