fix(transition): fixed enter event trigger multiple times (#5157)

This commit is contained in:
landluck 2022-12-21 11:15:37 +08:00 committed by GitHub
parent 3a716ea15b
commit e4ad5cc51a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,10 @@ export function transition(showDefaultValue: boolean) {
const classNames = getClassNames(name); const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.enter : duration; const currentDuration = isObj(duration) ? duration.enter : duration;
if (this.status === 'enter') {
return;
}
this.status = 'enter'; this.status = 'enter';
this.$emit('before-enter'); this.$emit('before-enter');