fix(runtime-dom): fix patching for attributes starting with on
fix #949 BREAKING CHANGE: Only props starting with `on` followed by an uppercase letter or a non-letter character are considered event listeners.
This commit is contained in:
@@ -66,12 +66,12 @@ export function emit(
|
||||
}
|
||||
}
|
||||
|
||||
let handler = props[`on${event}`] || props[`on${capitalize(event)}`]
|
||||
let handler = props[`on${capitalize(event)}`]
|
||||
// for v-model update:xxx events, also trigger kebab-case equivalent
|
||||
// for props passed via kebab-case
|
||||
if (!handler && event.indexOf('update:') === 0) {
|
||||
event = hyphenate(event)
|
||||
handler = props[`on${event}`] || props[`on${capitalize(event)}`]
|
||||
handler = props[`on${capitalize(event)}`]
|
||||
}
|
||||
if (handler) {
|
||||
callWithAsyncErrorHandling(
|
||||
|
||||
Reference in New Issue
Block a user