Skip to content

Commit

Permalink
fix: static directive arg should not recognize as expression
Browse files Browse the repository at this point in the history
close #2678
  • Loading branch information
johnsoncodehk committed Apr 23, 2023
1 parent 312bcd3 commit ded5a0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-language-core/src/generators/template.ts
Expand Up @@ -1260,7 +1260,7 @@ export function generate(

identifiers.add(camelize('v-' + prop.name));

if (prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
if (prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && !prop.arg.isStatic) {
codes.push(
...createInterpolationCode(
prop.arg.content,
Expand Down
3 changes: 3 additions & 0 deletions packages/vue-test-workspace/vue-tsc/#2678/main.vue
@@ -0,0 +1,3 @@
<template>
<div v-touch:swipe></div>
</template>

0 comments on commit ded5a0e

Please sign in to comment.