mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: improve generated compiled code
This commit is contained in:
@@ -10,8 +10,8 @@ exports[`t-ref can get a dynamic ref on a node 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const refs = ctx.__owl__.refs;
|
||||
const v1 = ctx['id'];
|
||||
let d1 = (el) => refs[\`myspan\${v1}\`] = el;
|
||||
return block1([d1]);
|
||||
let ref1 = (el) => refs[\`myspan\${v1}\`] = el;
|
||||
return block1([ref1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -100,9 +100,9 @@ exports[`t-ref refs in a loop 1`] = `
|
||||
let key1 = ctx['item'];
|
||||
const tKey_1 = ctx['item'];
|
||||
const v2 = ctx['item'];
|
||||
let d1 = (el) => refs[\`\${v2}\`] = el;
|
||||
let d2 = ctx['item'];
|
||||
c_block2[i1] = withKey(block3([d1, d2]), tKey_1 + key1);
|
||||
let ref1 = (el) => refs[\`\${v2}\`] = el;
|
||||
let txt2 = ctx['item'];
|
||||
c_block2[i1] = withKey(block3([ref1, txt2]), tKey_1 + key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
|
||||
Reference in New Issue
Block a user