fix(transition): transition should accept multiple handlers on same event
fix #1746
This commit is contained in:
parent
791eff3dfb
commit
48576e582c
@ -105,6 +105,8 @@ export function useTransitionState(): TransitionState {
|
|||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TransitionHookValidator = [Function, Array]
|
||||||
|
|
||||||
const BaseTransitionImpl = {
|
const BaseTransitionImpl = {
|
||||||
name: `BaseTransition`,
|
name: `BaseTransition`,
|
||||||
|
|
||||||
@ -113,20 +115,20 @@ const BaseTransitionImpl = {
|
|||||||
appear: Boolean,
|
appear: Boolean,
|
||||||
persisted: Boolean,
|
persisted: Boolean,
|
||||||
// enter
|
// enter
|
||||||
onBeforeEnter: Function,
|
onBeforeEnter: TransitionHookValidator,
|
||||||
onEnter: Function,
|
onEnter: TransitionHookValidator,
|
||||||
onAfterEnter: Function,
|
onAfterEnter: TransitionHookValidator,
|
||||||
onEnterCancelled: Function,
|
onEnterCancelled: TransitionHookValidator,
|
||||||
// leave
|
// leave
|
||||||
onBeforeLeave: Function,
|
onBeforeLeave: TransitionHookValidator,
|
||||||
onLeave: Function,
|
onLeave: TransitionHookValidator,
|
||||||
onAfterLeave: Function,
|
onAfterLeave: TransitionHookValidator,
|
||||||
onLeaveCancelled: Function,
|
onLeaveCancelled: TransitionHookValidator,
|
||||||
// appear
|
// appear
|
||||||
onBeforeAppear: Function,
|
onBeforeAppear: TransitionHookValidator,
|
||||||
onAppear: Function,
|
onAppear: TransitionHookValidator,
|
||||||
onAfterAppear: Function,
|
onAfterAppear: TransitionHookValidator,
|
||||||
onAppearCancelled: Function
|
onAppearCancelled: TransitionHookValidator
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props: BaseTransitionProps, { slots }: SetupContext) {
|
setup(props: BaseTransitionProps, { slots }: SetupContext) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user