fix(runtime-core): fix kebab-case prop required warning

fix #3495
ref #3363
This commit is contained in:
Evan You
2021-03-27 11:16:39 -04:00
parent 37c17091fd
commit 2121c32e22
2 changed files with 25 additions and 1 deletions

View File

@@ -480,7 +480,12 @@ function validateProps(
for (const key in options) {
let opt = options[key]
if (opt == null) continue
validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key))
validateProp(
key,
resolvedValues[key],
opt,
!hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
)
}
}