File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,16 @@ export function renderComponentRoot(
107
107
root . patchFlag |= PatchFlags . FULL_PROPS
108
108
}
109
109
} else if ( __DEV__ && ! accessedAttrs && root . type !== Comment ) {
110
+ const hasListeners = Object . keys ( attrs ) . some ( isOn )
110
111
warn (
111
112
`Extraneous non-props attributes (` +
112
113
`${ Object . keys ( attrs ) . join ( ', ' ) } ) ` +
113
114
`were passed to component but could not be automatically inherited ` +
114
- `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
+ : `` )
115
120
)
116
121
}
117
122
}
You can’t perform that action at this time.
0 commit comments