From 01db4d5809c7b90f66534acc284c8e33cb8bca94 Mon Sep 17 00:00:00 2001 From: wunci Date: Wed, 24 Jan 2024 23:15:59 +0800 Subject: [PATCH] fix: wrap "propsAttr" with quotation --- src/compilers/anode-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compilers/anode-compiler.ts b/src/compilers/anode-compiler.ts index 6e66198c..b63fcc94 100644 --- a/src/compilers/anode-compiler.ts +++ b/src/compilers/anode-compiler.ts @@ -244,7 +244,7 @@ export class ANodeCompiler { const rootAttrExec = [] if (Object.keys(propsAttrAssign).length) { rootAttrExec.push(...[ - DEF('propsAttr', new MapLiteral(Object.keys(propsAttrAssign).map(name => [I(name), I('1')]))), + DEF('propsAttr', new MapLiteral(Object.keys(propsAttrAssign).map(name => [L(name), L(1)]))), new Foreach(I('key'), I('val'), I('attrs'), [ // 如果props已经存在对应属性,则attr重复的属性需要被删除 new If(