Skip to content

Commit

Permalink
fix: some case
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Sep 15, 2023
1 parent f5e84d2 commit 1eeba86
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,9 @@ async function removeTypesFromVueSfcScript(
traverseVueAst(templateAst, {
enter(node) {
if (isVueSimpleExpressionNode(node) && !node.isStatic) {
const content = node.content.trim();
if (content.startsWith("{") && content.endsWith("}")) {
expressions.add(`[${content}]`);
} else {
expressions.add(content);
}
expressions.add(`[${node.content}]`);
} else if (isVueComponentNode(node)) {
expressions.add(node.tag);
expressions.add(`[${node.tag}]`);
}
},
});
Expand Down

0 comments on commit 1eeba86

Please sign in to comment.