Skip to content

Commit d34ea59

Browse files
committed
fix(language-core): avoid clipping prop name using .prop or .attr on v-model
1 parent af9ca0f commit d34ea59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export function* generateElementProps(
100100
continue;
101101
}
102102

103-
if (prop.modifiers.some(m => m.content === 'prop' || m.content === 'attr')) {
103+
if (
104+
prop.name === 'bind'
105+
&& prop.modifiers.some(m => m.content === 'prop' || m.content === 'attr')
106+
) {
104107
propName = propName.slice(1);
105108
}
106109

0 commit comments

Comments
 (0)