|
|
@@ -10,12 +10,11 @@ import {
|
|
|
hasCSSTransform,
|
|
|
onBeforeUpdate,
|
|
|
onUpdated,
|
|
|
- queuePostFlushCb,
|
|
|
resolveTransitionProps,
|
|
|
useTransitionState,
|
|
|
warn,
|
|
|
} from '@vue/runtime-dom'
|
|
|
-import { extend, invokeArrayFns, isArray } from '@vue/shared'
|
|
|
+import { extend, isArray } from '@vue/shared'
|
|
|
import {
|
|
|
type Block,
|
|
|
type TransitionBlock,
|
|
|
@@ -125,7 +124,6 @@ export const VaporTransitionGroup: ObjectVaporComponent = decorate({
|
|
|
props: cssTransitionProps,
|
|
|
state,
|
|
|
instance,
|
|
|
- group: true,
|
|
|
} as VaporTransitionHooks)
|
|
|
|
|
|
children = getTransitionBlocks(slottedBlock)
|
|
|
@@ -139,7 +137,6 @@ export const VaporTransitionGroup: ObjectVaporComponent = decorate({
|
|
|
state,
|
|
|
instance!,
|
|
|
)
|
|
|
- hooks.group = true
|
|
|
setTransitionHooks(child, hooks)
|
|
|
} else if (__DEV__) {
|
|
|
warn(`<transition-group> children must be keyed`)
|
|
|
@@ -216,23 +213,3 @@ function getFirstConnectedChild(
|
|
|
if (el.isConnected) return el
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-/**
|
|
|
- * The implementation of TransitionGroup relies on the onBeforeUpdate and onUpdated hooks.
|
|
|
- * However, when the slot content of TransitionGroup updates, it does not trigger the
|
|
|
- * onBeforeUpdate and onUpdated hooks. Therefore, it is necessary to manually trigger
|
|
|
- * the TransitionGroup update hooks to ensure its proper work.
|
|
|
- */
|
|
|
-export function triggerTransitionGroupUpdate(
|
|
|
- transition: VaporTransitionHooks,
|
|
|
-): void {
|
|
|
- const { instance } = transition
|
|
|
- if (!instance.isUpdating) {
|
|
|
- instance.isUpdating = true
|
|
|
- if (instance.bu) invokeArrayFns(instance.bu)
|
|
|
- queuePostFlushCb(() => {
|
|
|
- instance.isUpdating = false
|
|
|
- if (instance.u) invokeArrayFns(instance.u)
|
|
|
- })
|
|
|
- }
|
|
|
-}
|