Improved deep slot support
This commit is contained in:
parent
f7248d029c
commit
430f27f24c
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<FormulateSlot
|
||||
name="grouping"
|
||||
class="formulate-input-grouping"
|
||||
:context="context"
|
||||
>
|
||||
<FormulateRepeatableProvider
|
||||
|
@ -9,6 +9,10 @@ export default {
|
||||
if (p.$scopedSlots && p.$scopedSlots[props.name]) {
|
||||
return p.$scopedSlots[props.name](props.context || props)
|
||||
}
|
||||
return h('div', data, children)
|
||||
if (children.length > 1) {
|
||||
const { name, context, ...attrs } = data.attrs
|
||||
return h('div', { ...data, ...{ attrs } }, children)
|
||||
}
|
||||
return children[0]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user