wip: tests for compiler compat

This commit is contained in:
Evan You
2021-04-30 15:50:32 -04:00
parent b4c92ccf6b
commit bd3cc4d2c7
9 changed files with 271 additions and 79 deletions

View File

@@ -4,9 +4,11 @@ import { DeprecationTypes, isCompatEnabled } from './compatConfig'
export function shouldSkipAttr(
key: string,
value: any,
instance: ComponentInternalInstance
): boolean {
if (key === 'is') {
return true
}
if (
(key === 'class' || key === 'style') &&
isCompatEnabled(DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE, instance)

View File

@@ -114,6 +114,7 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) {
$listeners: getCompatListeners
} as PublicPropertiesMap)
/* istanbul ignore if */
if (isCompatEnabled(DeprecationTypes.PRIVATE_APIS, null)) {
extend(map, {
$vnode: i => i.vnode,