Skip to content

Commit ef72810

Browse files
committed
fix(alita): 修复中文展示乱码的bug
1 parent 41e6f89 commit ef72810

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tran/compPreHandle.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export default function compPreHandle(ast, info) {
4545

4646
if (pp.type === 'JSXAttribute') {
4747
// <A name={"yk"}/> 修改为 <A name="yk"/>
48-
path.replaceWith(t.stringLiteral(path.node.expression.value))
48+
path.replaceWith(path.node.expression)
49+
4950
} else {
5051
// <A>{"yk"}</A> 修改为 <A>yk</A>
5152
path.replaceWith(t.jsxText(path.node.expression.value))

0 commit comments

Comments
 (0)