wip: more compat tweaks

This commit is contained in:
Evan You
2021-04-22 14:59:54 -04:00
parent 98bc9a26e9
commit 7e0224aa8c
9 changed files with 86 additions and 14 deletions

View File

@@ -107,7 +107,11 @@ const normalizeVNodeSlots = (
instance: ComponentInternalInstance,
children: VNodeNormalizedChildren
) => {
if (__DEV__ && !isKeepAlive(instance.vnode)) {
if (
__DEV__ &&
!isKeepAlive(instance.vnode) &&
!(__COMPAT__ && isCompatEnabled(DeprecationTypes.RENDER_FUNCTION, instance))
) {
warn(
`Non-function value encountered for default slot. ` +
`Prefer function slots for better performance.`