fix: kebab-case events are attached correctly on web components, see #2841 (#2847)

This commit is contained in:
shadowings-zy
2021-02-09 14:58:36 +08:00
committed by GitHub
parent 1cc8712235
commit b302cbbbd3
2 changed files with 28 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { isArray } from '@vue/shared'
import { hyphenate, isArray } from '@vue/shared'
import {
ComponentInternalInstance,
callWithAsyncErrorHandling
@@ -96,7 +96,7 @@ function parseName(name: string): [string, EventListenerOptions | undefined] {
options
}
}
return [name.slice(2).toLowerCase(), options]
return [hyphenate(name.slice(2)), options]
}
function createInvoker(