Kaynağa Gözat

fix(BaseTransition): fix `BaseTransition` delayed leave with mode `in-out` (#1404)

fix #1400
underfin 5 yıl önce
ebeveyn
işleme
2ff8dcab0a

+ 0 - 2
packages/runtime-core/src/components/BaseTransition.ts

@@ -185,7 +185,6 @@ const BaseTransitionImpl = {
         oldInnerChild.type !== Comment &&
         oldInnerChild.type !== Comment &&
         !isSameVNodeType(innerChild, oldInnerChild)
         !isSameVNodeType(innerChild, oldInnerChild)
       ) {
       ) {
-        const prevHooks = oldInnerChild.transition!
         const leavingHooks = resolveTransitionHooks(
         const leavingHooks = resolveTransitionHooks(
           oldInnerChild,
           oldInnerChild,
           rawProps,
           rawProps,
@@ -204,7 +203,6 @@ const BaseTransitionImpl = {
           }
           }
           return emptyPlaceholder(child)
           return emptyPlaceholder(child)
         } else if (mode === 'in-out') {
         } else if (mode === 'in-out') {
-          delete prevHooks.delayedLeave
           leavingHooks.delayLeave = (
           leavingHooks.delayLeave = (
             el: TransitionElement,
             el: TransitionElement,
             earlyRemove,
             earlyRemove,