fix(runtime-core/emits): merge emits options from mixins/extends
fix #1562
This commit is contained in:
@@ -242,8 +242,6 @@ function setFullProps(
|
||||
attrs: Data
|
||||
) {
|
||||
const [options, needCastKeys] = normalizePropsOptions(instance.type)
|
||||
const emits = instance.type.emits
|
||||
|
||||
if (rawProps) {
|
||||
for (const key in rawProps) {
|
||||
const value = rawProps[key]
|
||||
@@ -256,7 +254,7 @@ function setFullProps(
|
||||
let camelKey
|
||||
if (options && hasOwn(options, (camelKey = camelize(key)))) {
|
||||
props[camelKey] = value
|
||||
} else if (!emits || !isEmitListener(emits, key)) {
|
||||
} else if (!isEmitListener(instance.type, key)) {
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user