diff --git a/packages/language-core/lib/codegen/template/elementEvents.ts b/packages/language-core/lib/codegen/template/elementEvents.ts index a883bab4e3..0449911c90 100644 --- a/packages/language-core/lib/codegen/template/elementEvents.ts +++ b/packages/language-core/lib/codegen/template/elementEvents.ts @@ -36,7 +36,7 @@ export function* generateElementEvents( const name = isVNodeEvent ? 'vnode-' + prop.arg.loc.source.slice('vue:'.length) : prop.arg.loc.source; - const originalPropName = camelize('on-' + prop.arg.loc.source); + const originalPropName = camelize('on-' + name); yield `const ${ctx.getInternalVariable()}: __VLS_NormalizeComponentEvent = {${newLine}`; yield* generateEventArg(ctx, prop.arg, name, isVNodeEvent); yield `: `;