We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8d9547 commit 8aa151bCopy full SHA for 8aa151b
packages/shared/stub-components.js
@@ -110,6 +110,20 @@ export function createBlankStub (
110
return {
111
...getCoreProperties(componentOptions),
112
render (h, context) {
113
+ let innerContent = null
114
+ if (context) {
115
+ innerContent = context.children
116
+ } else {
117
+ innerContent = Object.keys(this.$slots).map(slotName => {
118
+ const slot = this.$slots[slotName]
119
+ if (slotName !== 'default') {
120
+ return slot
121
122
+ const element = h('div', { class: `${slotName}-slot` }, slot)
123
+ return element
124
+ }
125
+ })
126
127
return h(
128
tagName,
129
{
@@ -124,7 +138,7 @@ export function createBlankStub (
138
...this.$props
139
}
140
},
- context ? context.children : this.$slots.default
141
+ innerContent
142
)
143
130
144
0 commit comments