chore: improve BaseTransition (#4811)

This commit is contained in:
Che Guevara
2021-11-25 18:42:24 +08:00
committed by GitHub
parent 89c54ee2b9
commit 4e1131e251
2 changed files with 20 additions and 1 deletions

View File

@@ -161,7 +161,11 @@ const BaseTransitionImpl: ComponentOptions = {
const rawProps = toRaw(props)
const { mode } = rawProps
// check mode
if (__DEV__ && mode && !['in-out', 'out-in', 'default'].includes(mode)) {
if (
__DEV__ &&
mode &&
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default'
) {
warn(`invalid <transition> mode: ${mode}`)
}