From 1156827915add5c8bb3c2492dd1a9bbae8f5d9f0 Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Thu, 27 Oct 2022 03:59:03 +0000 Subject: [PATCH] feat(#578): add support for the template tool --- .changeset/rude-lizards-pretend.md | 5 +++ .../router/src/components/DruxtRouter.vue | 31 +++++++++++++------ 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 .changeset/rude-lizards-pretend.md diff --git a/.changeset/rude-lizards-pretend.md b/.changeset/rude-lizards-pretend.md new file mode 100644 index 000000000..c70c2b3f9 --- /dev/null +++ b/.changeset/rude-lizards-pretend.md @@ -0,0 +1,5 @@ +--- +"druxt-router": minor +--- + +feat(#578): updated component to support the DruxtDevelTemplate tool. diff --git a/packages/router/src/components/DruxtRouter.vue b/packages/router/src/components/DruxtRouter.vue index 3a235e377..69ad033f3 100644 --- a/packages/router/src/components/DruxtRouter.vue +++ b/packages/router/src/components/DruxtRouter.vue @@ -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' + } } } }