Skip to content

Commit ff341a2

Browse files
Samuell1marcosmoura
authored andcommitted
feat(MdApp): allow custom components with slot (#1387)
1 parent e24f8dc commit ff341a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/MdApp/MdApp.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
1414
if (children) {
1515
children.forEach(child => {
16-
const opts = child.componentOptions
16+
const data = child.data
17+
const componentOptions = child.componentOptions
1718
18-
if (opts && componentTypes.includes(opts.tag)) {
19-
child.data.slot = opts.tag
19+
if ((data && componentTypes.includes(data.slot)) || (componentOptions && componentTypes.includes(componentOptions.tag))) {
20+
child.data.slot = data.slot || componentOptions.tag
2021
child.data.provide = options.Ctor.options.provide
2122
child.context = context
2223
child.functionalContext = functionalContext

0 commit comments

Comments
 (0)