We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e954ba2 commit ab844fdCopy full SHA for ab844fd
packages/runtime-core/src/componentRenderUtils.ts
@@ -107,11 +107,16 @@ export function renderComponentRoot(
107
root.patchFlag |= PatchFlags.FULL_PROPS
108
}
109
} else if (__DEV__ && !accessedAttrs && root.type !== Comment) {
110
+ const hasListeners = Object.keys(attrs).some(isOn)
111
warn(
112
`Extraneous non-props attributes (` +
113
`${Object.keys(attrs).join(', ')}) ` +
114
`were passed to component but could not be automatically inherited ` +
- `because component renders fragment or text root nodes.`
115
+ `because component renders fragment or text root nodes.` +
116
+ (hasListeners
117
+ ? ` If the v-on listener is intended to be a component custom ` +
118
+ `event listener only, declare it using the "emits" option.`
119
+ : ``)
120
)
121
122
0 commit comments