Quasar provides some useful ready to use Vue directives. If you don’t know what a directive is, read here.
This one takes one parameter (a Function) and fires when user scrolls the page containing that DOM node.
Please note that by default the method called is not debounced. For that you have to do it yourself, by wrapping your method with
Utils.debouncelike in example below.
Read more about
There is one more scrolling-related directive available called “Scroll Fire” described on its own documentation page. Read more here.
Vue 2 has dropped
v-link directive, but Quasar offers one with limited functionality.
Use this directive instead of
<router-link> for cases like the following one when you don’t want your Vue component wrapped by another DOM element (like an
Basically, just specify the route as parameter. It adds an
onclick event on the respective DOM which tells Vue Router to push to that route.
The default behavior is for the router to push a new entry in history. If however you want current route to be replaced (instead of pushed to
window.history) then add
If you want for some reason to delay the route change (like on Drawer elements which close it), use
delay modifier. Route will change with a delay of 100ms.