[IMP] compiler: improve generated compiled code

This commit is contained in:
Géry Debongnie
2021-12-22 11:33:12 +01:00
committed by Aaron Bohy
parent bd5637c0a3
commit c7af885f43
36 changed files with 939 additions and 936 deletions
@@ -31,8 +31,8 @@ exports[`t-key t-foreach with t-key switch component position 2`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;
@@ -57,8 +57,8 @@ exports[`t-key t-key on Component 2`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;
@@ -86,8 +86,8 @@ exports[`t-key t-key on Component as a function 2`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;
@@ -117,8 +117,8 @@ exports[`t-key t-key on multiple Components 2`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;
@@ -170,8 +170,8 @@ exports[`t-key t-key on multiple Components with t-call 1 3`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;
@@ -215,8 +215,8 @@ exports[`t-key t-key on multiple Components with t-call 2 3`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].key;
return block1([d1]);
let txt1 = ctx['props'].key;
return block1([txt1]);
}
}"
`;