From e4ad5cc51a9343c79b0037e0a4910131d591bad1 Mon Sep 17 00:00:00 2001 From: landluck Date: Wed, 21 Dec 2022 11:15:37 +0800 Subject: [PATCH] fix(transition): fixed enter event trigger multiple times (#5157) --- packages/mixins/transition.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/mixins/transition.ts b/packages/mixins/transition.ts index bad60335..55c2d1fd 100644 --- a/packages/mixins/transition.ts +++ b/packages/mixins/transition.ts @@ -57,6 +57,10 @@ export function transition(showDefaultValue: boolean) { const classNames = getClassNames(name); const currentDuration = isObj(duration) ? duration.enter : duration; + if (this.status === 'enter') { + return; + } + this.status = 'enter'; this.$emit('before-enter');