feat(transition): warn non-animatable component root node
This commit is contained in:
parent
e83984d7fc
commit
01eb3c12e9
@ -88,7 +88,16 @@ export function renderComponentRoot(
|
||||
|
||||
// inherit transition data
|
||||
if (vnode.transition != null) {
|
||||
// TODO warn if component has transition data but root is a fragment
|
||||
if (
|
||||
__DEV__ &&
|
||||
!(result.shapeFlag & ShapeFlags.COMPONENT) &&
|
||||
!(result.shapeFlag & ShapeFlags.ELEMENT)
|
||||
) {
|
||||
warn(
|
||||
`Component inside <Transition> renders non-element root node ` +
|
||||
`that cannot be animated.`
|
||||
)
|
||||
}
|
||||
result.transition = vnode.transition
|
||||
}
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user