Skip to content

Commit

Permalink
feat(MdApp): allow custom components with slot (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 authored and marcosmoura committed Jan 12, 2018
1 parent e24f8dc commit ff341a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/MdApp/MdApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff341a2

Please sign in to comment.