Skip to content

Commit edb85ed

Browse files
committed
fix(language-core): Vue 2 nameless event expression should not be a function
1 parent 94c3386 commit edb85ed

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

packages/language-core/lib/codegen/template/elementEvents.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,6 @@ export function* generateElementEvents(
6363
yield* generateEventExpression(options, ctx, prop);
6464
yield `}${endOfLine}`;
6565
}
66-
else if (
67-
prop.type === CompilerDOM.NodeTypes.DIRECTIVE
68-
&& prop.name === 'on'
69-
&& prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION
70-
) {
71-
// for vue 2 nameless event
72-
// https://github.com/johnsoncodehk/vue-tsc/issues/67
73-
yield* generateInterpolation(
74-
options,
75-
ctx,
76-
prop.exp.content,
77-
prop.exp.loc,
78-
prop.exp.loc.start.offset,
79-
ctx.codeFeatures.all,
80-
'[...[$event]] => {(',
81-
')}',
82-
);
83-
yield endOfLine;
84-
}
8566
}
8667
return usedComponentEventsVar;
8768
}

packages/language-core/lib/codegen/template/elementProps.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function* generateElementProps(
2323
const isIntrinsicElement = node.tagType === CompilerDOM.ElementTypes.ELEMENT || node.tagType === CompilerDOM.ElementTypes.TEMPLATE;
2424
const canCamelize = node.tagType === CompilerDOM.ElementTypes.COMPONENT;
2525

26-
2726
for (const prop of props) {
2827
if (
2928
prop.type === CompilerDOM.NodeTypes.DIRECTIVE

0 commit comments

Comments
 (0)