From ff341a2306b23f8e98723b5660747135f010fb2b Mon Sep 17 00:00:00 2001 From: Samuell Date: Fri, 12 Jan 2018 19:28:39 +0100 Subject: [PATCH] feat(MdApp): allow custom components with slot (#1387) --- src/components/MdApp/MdApp.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/MdApp/MdApp.vue b/src/components/MdApp/MdApp.vue index cc38763ef..a83089d5c 100644 --- a/src/components/MdApp/MdApp.vue +++ b/src/components/MdApp/MdApp.vue @@ -13,10 +13,11 @@ if (children) { children.forEach(child => { - const opts = child.componentOptions + const data = child.data + const componentOptions = child.componentOptions - if (opts && componentTypes.includes(opts.tag)) { - child.data.slot = opts.tag + if ((data && componentTypes.includes(data.slot)) || (componentOptions && componentTypes.includes(componentOptions.tag))) { + child.data.slot = data.slot || componentOptions.tag child.data.provide = options.Ctor.options.provide child.context = context child.functionalContext = functionalContext