wip: compat integration progress

This commit is contained in:
Evan You
2021-04-20 09:25:12 -04:00
parent 7dc681c196
commit f6dee53270
10 changed files with 183 additions and 22 deletions

View File

@@ -20,7 +20,8 @@ import {
isReservedProp,
EMPTY_ARR,
def,
extend
extend,
isOn
} from '@vue/shared'
import { warn } from './warning'
import {
@@ -224,6 +225,13 @@ export function updateProps(
)
}
} else {
if (
__COMPAT__ &&
isOn(key) &&
isCompatEnabled(DeprecationTypes.INSTANCE_LISTENERS, instance)
) {
continue
}
attrs[key] = value
}
}
@@ -320,6 +328,13 @@ function setFullProps(
// Any non-declared (either as a prop or an emitted event) props are put
// into a separate `attrs` object for spreading. Make sure to preserve
// original key casing
if (
__COMPAT__ &&
isOn(key) &&
isCompatEnabled(DeprecationTypes.INSTANCE_LISTENERS, instance)
) {
continue
}
attrs[key] = value
}
}