Skip to content

Commit

Permalink
fix(language-core): avoid clipping prop name using .prop or .attr
Browse files Browse the repository at this point in the history
… on `v-model`
  • Loading branch information
KazariEX committed Dec 17, 2024
1 parent af9ca0f commit d34ea59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/language-core/lib/codegen/template/elementProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ export function* generateElementProps(
continue;
}

if (prop.modifiers.some(m => m.content === 'prop' || m.content === 'attr')) {
if (
prop.name === 'bind'
&& prop.modifiers.some(m => m.content === 'prop' || m.content === 'attr')
) {
propName = propName.slice(1);
}

Expand Down

0 comments on commit d34ea59

Please sign in to comment.