mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] qweb: compiler: support t-key on node and component without t-foreach
This commit is contained in:
committed by
Aaron Bohy
parent
16f1e2c237
commit
7c04cc425e
@@ -79,8 +79,9 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['myComponent'];
|
||||
return toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
const tKey_1 = ctx['state'].child;
|
||||
let Comp3 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp3, component(Comp3, {}, tKey_1 + key + \`__2\`, node, ctx)));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -120,8 +121,9 @@ exports[`t-component can use dynamic components (the class) if given 3`] = `
|
||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['myComponent'];
|
||||
return toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
const tKey_1 = ctx['state'].child;
|
||||
let Comp3 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp3, component(Comp3, {}, tKey_1 + key + \`__2\`, node, ctx)));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user