Skip to content

Commit

Permalink
feat(#578): add support for the template tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Oct 27, 2022
1 parent bc084dd commit 1156827
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-lizards-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"druxt-router": minor
---

feat(#578): updated component to support the DruxtDevelTemplate tool.
31 changes: 21 additions & 10 deletions packages/router/src/components/DruxtRouter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,29 @@ export default {
*
* @return {ScopedSlots} The Scoped slots object.
*/
slots(h) {
const scopedSlots = {}
// slots(h) {
// const scopedSlots = {}
// // Provide defualt error message.
// if (this.model.error) {
// scopedSlots.default = () => h('div', [
// h('h1', [`Error ${this.model.error.statusCode}`]),
// h('p', [this.model.error.message]),
// ])
// }
// return scopedSlots
// }
// Provide defualt error message.
if (this.model.error) {
scopedSlots.default = () => h('div', [
h('h1', [`Error ${this.model.error.statusCode}`]),
h('p', [this.model.error.message]),
])
}
return scopedSlots
/**
* Druxt development template tool configuration.
*/
template: {
debug: '{ path, route }',
mixins: {
'DruxtRouterMixin': 'druxt-router'
}
}
}
}
Expand Down

0 comments on commit 1156827

Please sign in to comment.