fix(runtime-core): fix resolving inheritAttrs from mixins (#3742)

fix #3741
This commit is contained in:
edison
2021-05-28 09:53:41 +08:00
committed by GitHub
parent 9b2e894017
commit d6607c9864
5 changed files with 65 additions and 21 deletions

View File

@@ -55,7 +55,8 @@ export function renderComponentRoot(
renderCache,
data,
setupState,
ctx
ctx,
inheritAttrs
} = instance
let result
@@ -123,7 +124,7 @@ export function renderComponentRoot(
;[root, setRoot] = getChildRoot(result)
}
if (fallthroughAttrs && Component.inheritAttrs !== false) {
if (fallthroughAttrs && inheritAttrs !== false) {
const keys = Object.keys(fallthroughAttrs)
const { shapeFlag } = root
if (keys.length) {
@@ -190,7 +191,7 @@ export function renderComponentRoot(
) {
const { class: cls, style } = vnode.props || {}
if (cls || style) {
if (__DEV__ && Component.inheritAttrs === false) {
if (__DEV__ && inheritAttrs === false) {
warnDeprecation(
DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE,
instance,