fix: mark single root for transition block
This commit is contained in:
parent
cb8830fdc2
commit
542e4012c1
|
@ -74,6 +74,9 @@ export const VaporTransition: FunctionalVaporComponent = /*@__PURE__*/ decorate(
|
||||||
const resolvedAttrs = extend({}, attrs)
|
const resolvedAttrs = extend({}, attrs)
|
||||||
const child = findTransitionBlock(children)
|
const child = findTransitionBlock(children)
|
||||||
if (child) {
|
if (child) {
|
||||||
|
// mark single root
|
||||||
|
;(child as any).$root = true
|
||||||
|
|
||||||
applyFallthroughProps(child, resolvedAttrs)
|
applyFallthroughProps(child, resolvedAttrs)
|
||||||
// ensure fallthrough attrs are not happened again in
|
// ensure fallthrough attrs are not happened again in
|
||||||
// applyTransitionHooks
|
// applyTransitionHooks
|
||||||
|
@ -189,6 +192,8 @@ export function applyTransitionHooks(
|
||||||
|
|
||||||
// fallthrough attrs
|
// fallthrough attrs
|
||||||
if (fallthroughAttrs && instance.hasFallthrough) {
|
if (fallthroughAttrs && instance.hasFallthrough) {
|
||||||
|
// mark single root
|
||||||
|
;(child as any).$root = true
|
||||||
applyFallthroughProps(child, instance.attrs)
|
applyFallthroughProps(child, instance.attrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ export const VaporTransitionGroup: ObjectVaporComponent = decorate({
|
||||||
insert(slottedBlock, container)
|
insert(slottedBlock, container)
|
||||||
// fallthrough attrs
|
// fallthrough attrs
|
||||||
if (instance!.hasFallthrough) {
|
if (instance!.hasFallthrough) {
|
||||||
|
;(container as any).$root = true
|
||||||
renderEffect(() => applyFallthroughProps(container, instance!.attrs))
|
renderEffect(() => applyFallthroughProps(container, instance!.attrs))
|
||||||
}
|
}
|
||||||
return container
|
return container
|
||||||
|
|
Loading…
Reference in New Issue