-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Update QBtn/QBreadcrumbs/QItem/QRouteTab pages for the up…
…dated router-link specs
- Loading branch information
1 parent
6603aa2
commit 60d0ddf
Showing
8 changed files
with
200 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<div class="q-pa-md q-gutter-sm"> | ||
<q-breadcrumbs> | ||
<q-breadcrumbs-el label="Delayed" icon="widgets" to="/" @click="onDelayedClick" /> | ||
<q-breadcrumbs-el label="Cancelled" icon="navigation" to="/" @click="onCancelledClick" /> | ||
<q-breadcrumbs-el label="Redirected" icon="build" to="/" @click="onRedirectedClick" /> | ||
<q-breadcrumbs-el label="Page" /> | ||
</q-breadcrumbs> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
methods: { | ||
onDelayedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// console.log('triggering navigation in 2s') | ||
setTimeout(() => { | ||
// console.log('navigating as promised 2s ago') | ||
go() | ||
}, 2000) | ||
}, | ||
onCancelledClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// then we never call go() | ||
}, | ||
onRedirectedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// call this at your convenience | ||
go({ | ||
to: '/start/pick-quasar-flavour' // we pick another route | ||
// replace: boolean; default is what the tab is configured with | ||
// returnRouterError: boolean | ||
}).then(_vueRouterResult => { /* ... */ }) | ||
.catch(_err => { /* ...we have a vue router error... */ }) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<div class="q-pa-md q-gutter-sm"> | ||
<q-btn to="/" label="Delayed navigation" @click="onDelayedClick" outline color="purple" no-caps /> | ||
<q-btn to="/" label="Cancelled navigation" @click="onCancelledClick" glossy color="purple" no-caps /> | ||
<q-btn to="/" label="Redirected navigation" @click="onRedirectedClick" glossy color="purple" no-caps /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
methods: { | ||
onDelayedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// console.log('triggering navigation in 2s') | ||
setTimeout(() => { | ||
// console.log('navigating as promised 2s ago') | ||
go() | ||
}, 2000) | ||
}, | ||
onCancelledClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// then we never call go() | ||
}, | ||
onRedirectedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// call this at your convenience | ||
go({ | ||
to: '/start/pick-quasar-flavour' // we pick another route | ||
// replace: boolean; default is what the tab is configured with | ||
// returnRouterError: boolean | ||
}).then(_vueRouterResult => { /* ... */ }) | ||
.catch(_err => { /* ...we have a vue router error... */ }) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<div class="q-pa-md q-gutter-sm"> | ||
<q-item to="/" @click="onDelayedClick" dense> | ||
<q-item-section>Delayed navigation</q-item-section> | ||
</q-item> | ||
|
||
<q-item to="/" @click="onCancelledClick" dense> | ||
<q-item-section>Cancelled navigation</q-item-section> | ||
</q-item> | ||
|
||
<q-item to="/" @click="onRedirectedClick" dense> | ||
<q-item-section>Redirected navigation</q-item-section> | ||
</q-item> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
methods: { | ||
onDelayedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// console.log('triggering navigation in 2s') | ||
setTimeout(() => { | ||
// console.log('navigating as promised 2s ago') | ||
go() | ||
}, 2000) | ||
}, | ||
onCancelledClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// then we never call go() | ||
}, | ||
onRedirectedClick (e, go) { | ||
e.preventDefault() // mandatory; we choose when we navigate | ||
// call this at your convenience | ||
go({ | ||
to: '/start/pick-quasar-flavour' // we pick another route | ||
// replace: boolean; default is what the tab is configured with | ||
// returnRouterError: boolean | ||
}).then(_vueRouterResult => { /* ... */ }) | ||
.catch(_err => { /* ...we have a vue router error... */ }) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters