fix(transition): should ship props declarations in production
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
getCurrentInstance,
|
||||
SetupContext,
|
||||
ComponentOptions,
|
||||
ComponentInternalInstance
|
||||
} from '../component'
|
||||
import {
|
||||
@@ -100,6 +99,23 @@ export function useTransitionState(): TransitionState {
|
||||
|
||||
const BaseTransitionImpl = {
|
||||
name: `BaseTransition`,
|
||||
|
||||
props: {
|
||||
mode: String,
|
||||
appear: Boolean,
|
||||
persisted: Boolean,
|
||||
// enter
|
||||
onBeforeEnter: Function,
|
||||
onEnter: Function,
|
||||
onAfterEnter: Function,
|
||||
onEnterCancelled: Function,
|
||||
// leave
|
||||
onBeforeLeave: Function,
|
||||
onLeave: Function,
|
||||
onAfterLeave: Function,
|
||||
onLeaveCancelled: Function
|
||||
},
|
||||
|
||||
setup(props: BaseTransitionProps, { slots }: SetupContext) {
|
||||
const instance = getCurrentInstance()!
|
||||
const state = useTransitionState()
|
||||
@@ -201,24 +217,6 @@ const BaseTransitionImpl = {
|
||||
}
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
;(BaseTransitionImpl as ComponentOptions).props = {
|
||||
mode: String,
|
||||
appear: Boolean,
|
||||
persisted: Boolean,
|
||||
// enter
|
||||
onBeforeEnter: Function,
|
||||
onEnter: Function,
|
||||
onAfterEnter: Function,
|
||||
onEnterCancelled: Function,
|
||||
// leave
|
||||
onBeforeLeave: Function,
|
||||
onLeave: Function,
|
||||
onAfterLeave: Function,
|
||||
onLeaveCancelled: Function
|
||||
}
|
||||
}
|
||||
|
||||
// export the public type for h/tsx inference
|
||||
// also to avoid inline import() in generated d.ts files
|
||||
export const BaseTransition = (BaseTransitionImpl as any) as {
|
||||
|
||||
Reference in New Issue
Block a user