File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
packages/runtime-dom/src/components Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 77 assertNumber ,
88 compatUtils ,
99 h ,
10+ isVNode ,
1011} from '@vue/runtime-core'
1112import { extend , isArray , isObject , toNumber } from '@vue/shared'
1213
@@ -99,12 +100,20 @@ const decorate = (t: typeof Transition) => {
99100 * base Transition component, with DOM-specific logic.
100101 */
101102export const Transition : FunctionalComponent < TransitionProps > =
102- /*@__PURE__ */ decorate ( ( props , { slots, vapor } : any ) => {
103+ /*@__PURE__ */ decorate ( ( props , { slots } ) => {
104+ const children = slots . default && slots . default ( )
105+ const isVNodeChildren = isArray ( children ) && children . some ( c => isVNode ( c ) )
103106 const resolvedProps = resolveTransitionProps ( props )
104- if ( vapor ) {
105- return vaporTransitionImpl ! . applyTransition ( resolvedProps , slots )
107+ if ( isVNodeChildren ) {
108+ return h ( BaseTransition , resolvedProps , {
109+ default : ( ) => children ,
110+ } )
106111 }
107- return h ( BaseTransition , resolvedProps , slots )
112+
113+ // vapor transition
114+ return vaporTransitionImpl ! . applyTransition ( resolvedProps , {
115+ default : ( ) => children ,
116+ } )
108117 } )
109118
110119/**
You can’t perform that action at this time.
0 commit comments