mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] compiler: introduce define helper, slightly refactor code
This commit is contained in:
committed by
Samuel Degueldre
parent
50355e6a3d
commit
998ecbb337
@@ -17,8 +17,8 @@ exports[`force render in case of existing render 2`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`C\`, {}, key + \`__1\`, node, ctx);
|
||||
let b3 = text(ctx['props'].val);
|
||||
const b2 = component(\`C\`, {}, key + \`__1\`, node, ctx);
|
||||
const b3 = text(ctx['props'].val);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -41,8 +41,8 @@ exports[`rendering semantics can force a render to update sub tree 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(ctx['state'].value);
|
||||
let b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = text(ctx['state'].value);
|
||||
const b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -65,8 +65,8 @@ exports[`rendering semantics can render a parent without rendering child 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(ctx['state'].value);
|
||||
let b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = text(ctx['state'].value);
|
||||
const b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -133,9 +133,9 @@ exports[`rendering semantics render with deep=true followed by render with deep=
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`parent\`);
|
||||
let b3 = text(ctx['state'].value);
|
||||
let b4 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = text(\`parent\`);
|
||||
const b3 = text(ctx['state'].value);
|
||||
const b4 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3, b4]);
|
||||
}
|
||||
}"
|
||||
@@ -147,8 +147,8 @@ exports[`rendering semantics render with deep=true followed by render with deep=
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`child\`);
|
||||
let b3 = text(ctx['env'].getValue());
|
||||
const b2 = text(\`child\`);
|
||||
const b3 = text(ctx['env'].getValue());
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -160,8 +160,8 @@ exports[`rendering semantics rendering is atomic (for one subtree) 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(ctx['state'].obj.val);
|
||||
let b3 = component(\`B\`, {obj: ctx['state'].obj}, key + \`__1\`, node, ctx);
|
||||
const b2 = text(ctx['state'].obj.val);
|
||||
const b3 = component(\`B\`, {obj: ctx['state'].obj}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
|
||||
Reference in New Issue
Block a user