wip: fix render fn compat detection

This commit is contained in:
Evan You
2021-04-11 11:15:40 -04:00
parent a2f441dc0e
commit c55f3ed0e8
9 changed files with 86 additions and 20 deletions

View File

@@ -46,6 +46,10 @@ export const Transition: FunctionalComponent<TransitionProps> = (
Transition.displayName = 'Transition'
if (__COMPAT__) {
Transition.__isBuiltIn = true
}
const DOMTransitionPropsValidators = {
name: String,
type: String,

View File

@@ -22,7 +22,8 @@ import {
SetupContext,
toRaw,
compatUtils,
DeprecationTypes
DeprecationTypes,
ComponentOptions
} from '@vue/runtime-core'
import { extend } from '@vue/shared'
@@ -39,7 +40,7 @@ export type TransitionGroupProps = Omit<TransitionProps, 'mode'> & {
moveClass?: string
}
const TransitionGroupImpl = {
const TransitionGroupImpl: ComponentOptions = {
name: 'TransitionGroup',
props: /*#__PURE__*/ extend({}, TransitionPropsValidators, {
@@ -145,6 +146,10 @@ const TransitionGroupImpl = {
}
}
if (__COMPAT__) {
TransitionGroupImpl.__isBuiltIn = true
}
/**
* TransitionGroup does not support "mode" so we need to remove it from the
* props declarations, but direct delete operation is considered a side effect