mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] qweb: improve generated code in some cases
This commit is contained in:
@@ -326,6 +326,9 @@ export class QWeb extends EventBus {
|
||||
_compile(name: string, elem: Element, parentContext?: Context): CompiledTemplate {
|
||||
const isDebug = elem.attributes.hasOwnProperty("t-debug");
|
||||
const ctx = new Context(name);
|
||||
if (elem.tagName !== 't') {
|
||||
ctx.shouldDefineResult = false;
|
||||
}
|
||||
if (parentContext) {
|
||||
ctx.templates = Object.create(parentContext.templates);
|
||||
ctx.variables = Object.create(parentContext.variables);
|
||||
|
||||
@@ -7,7 +7,6 @@ exports[`animations t-transition combined with component 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -42,7 +41,7 @@ exports[`animations t-transition combined with component 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -53,7 +52,6 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -90,7 +88,7 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -98,7 +96,6 @@ exports[`animations t-transition with no delay/duration 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let utils = this.constructor.utils;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('span', p1, c1);
|
||||
@@ -112,7 +109,7 @@ exports[`animations t-transition with no delay/duration 1`] = `
|
||||
},
|
||||
};
|
||||
c1.push({text: \`blue\`});
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -120,7 +117,6 @@ exports[`animations t-transition, on a simple node (insert) 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let utils = this.constructor.utils;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('span', p1, c1);
|
||||
@@ -134,6 +130,6 @@ exports[`animations t-transition, on a simple node (insert) 1`] = `
|
||||
},
|
||||
};
|
||||
c1.push({text: \`blue\`});
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -7,7 +7,6 @@ exports[`async rendering delayed component with t-asyncroot directive 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -80,7 +79,7 @@ exports[`async rendering delayed component with t-asyncroot directive 1`] = `
|
||||
def10 = def10.then(()=>{if (w11.__owl__.isDestroyed) {return};let pvnode=w11.__owl__.pvnode;c5[_9_index]=pvnode;});
|
||||
}
|
||||
def10.then(w11.__applyPatchQueue.bind(w11, patchQueue11));
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -91,7 +90,6 @@ exports[`async rendering fast component with t-asyncroot directive 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -164,7 +162,7 @@ exports[`async rendering fast component with t-asyncroot directive 1`] = `
|
||||
def10 = def10.then(()=>{if (w11.__owl__.isDestroyed) {return};let pvnode=w11.__owl__.pvnode;c5[_9_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def10);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -175,7 +173,6 @@ exports[`async rendering t-component with t-asyncroot directive: mixed re-render
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -248,7 +245,7 @@ exports[`async rendering t-component with t-asyncroot directive: mixed re-render
|
||||
def10 = def10.then(()=>{if (w11.__owl__.isDestroyed) {return};let pvnode=w11.__owl__.pvnode;c5[_9_index]=pvnode;});
|
||||
}
|
||||
def10.then(w11.__applyPatchQueue.bind(w11, patchQueue11));
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -259,7 +256,6 @@ exports[`class and style attributes with t-component dynamic t-att-style is prop
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -292,7 +288,7 @@ exports[`class and style attributes with t-component dynamic t-att-style is prop
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};w4.el.style=_5;let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -303,7 +299,6 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -339,7 +334,7 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
}
|
||||
w4.__owl__.classObj=_6;
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -347,14 +342,13 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let utils = this.constructor.utils;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let _2 = {'c':true};
|
||||
Object.assign(_2, utils.toObj({d:context['state'].d}))
|
||||
let c3 = [], p3 = {key:3,class:_2};
|
||||
var vn3 = h('span', p3, c3);
|
||||
result = vn3;
|
||||
return result;
|
||||
return vn3;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -365,7 +359,6 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -401,7 +394,7 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
}
|
||||
w4.__owl__.classObj=_6;
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -409,14 +402,13 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let utils = this.constructor.utils;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let _2 = {'c':true};
|
||||
Object.assign(_2, utils.toObj(context['state'].d?'d':''))
|
||||
let c3 = [], p3 = {key:3,class:_2};
|
||||
var vn3 = h('span', p3, c3);
|
||||
result = vn3;
|
||||
return result;
|
||||
return vn3;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -427,7 +419,6 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -461,7 +452,7 @@ exports[`class and style attributes with t-component t-att-class is properly add
|
||||
}
|
||||
w4.__owl__.classObj=_5;
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -472,7 +463,6 @@ exports[`composition sub components dom state with t-keepalive is preserved 1`]
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -506,7 +496,7 @@ exports[`composition sub components dom state with t-keepalive is preserved 1`]
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -517,7 +507,6 @@ exports[`composition sub components with some state rendered in a loop 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
context = Object.create(context);
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
@@ -567,7 +556,7 @@ exports[`composition sub components with some state rendered in a loop 1`] = `
|
||||
}
|
||||
extra.promises.push(def6);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -578,7 +567,6 @@ exports[`composition t-component with dynamic value 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -610,7 +598,7 @@ exports[`composition t-component with dynamic value 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -621,7 +609,6 @@ exports[`composition t-component with dynamic value 2 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -653,7 +640,7 @@ exports[`composition t-component with dynamic value 2 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -664,7 +651,6 @@ exports[`dynamic t-props basic use 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -696,7 +682,7 @@ exports[`dynamic t-props basic use 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -707,7 +693,6 @@ exports[`lifecycle hooks willPatch/patched hook with t-keepalive 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -741,7 +726,7 @@ exports[`lifecycle hooks willPatch/patched hook with t-keepalive 1`] = `
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -752,7 +737,6 @@ exports[`other directives with t-component t-on with handler bound to argument 1
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -784,7 +768,7 @@ exports[`other directives with t-component t-on with handler bound to argument 1
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -795,7 +779,6 @@ exports[`other directives with t-component t-on with handler bound to empty obje
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -827,7 +810,7 @@ exports[`other directives with t-component t-on with handler bound to empty obje
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -838,7 +821,6 @@ exports[`other directives with t-component t-on with handler bound to empty obje
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -870,7 +852,7 @@ exports[`other directives with t-component t-on with handler bound to empty obje
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -881,7 +863,6 @@ exports[`other directives with t-component t-on with handler bound to object 1`]
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -913,7 +894,7 @@ exports[`other directives with t-component t-on with handler bound to object 1`]
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -924,7 +905,6 @@ exports[`other directives with t-component t-on with prevent and self modifiers
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -956,7 +936,7 @@ exports[`other directives with t-component t-on with prevent and self modifiers
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -967,7 +947,6 @@ exports[`other directives with t-component t-on with self and prevent modifiers
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -999,7 +978,7 @@ exports[`other directives with t-component t-on with self and prevent modifiers
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1010,7 +989,6 @@ exports[`other directives with t-component t-on with self modifier 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1042,7 +1020,7 @@ exports[`other directives with t-component t-on with self modifier 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1053,7 +1031,6 @@ exports[`other directives with t-component t-on with stop and/or prevent modifie
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1085,7 +1062,7 @@ exports[`other directives with t-component t-on with stop and/or prevent modifie
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1096,7 +1073,6 @@ exports[`random stuff/miscellaneous snapshotting compiled code 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1130,7 +1106,7 @@ exports[`random stuff/miscellaneous snapshotting compiled code 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1141,7 +1117,6 @@ exports[`random stuff/miscellaneous t-on with handler bound to dynamic argument
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
context = Object.create(context);
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
@@ -1192,14 +1167,13 @@ exports[`random stuff/miscellaneous t-on with handler bound to dynamic argument
|
||||
}
|
||||
extra.promises.push(def6);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive .lazy modifier 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1217,14 +1191,13 @@ exports[`t-model directive .lazy modifier 1`] = `
|
||||
if (_4 || _4 === 0) {
|
||||
c3.push({text: _4});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive basic use, on an input 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1242,14 +1215,13 @@ exports[`t-model directive basic use, on an input 1`] = `
|
||||
if (_4 || _4 === 0) {
|
||||
c3.push({text: _4});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive on a select 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1288,14 +1260,13 @@ exports[`t-model directive on a select 1`] = `
|
||||
if (_10 || _10 === 0) {
|
||||
c9.push({text: _10});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive on a sub state key 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1313,14 +1284,13 @@ exports[`t-model directive on a sub state key 1`] = `
|
||||
if (_4 || _4 === 0) {
|
||||
c3.push({text: _4});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive on an input type=radio 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1351,14 +1321,13 @@ exports[`t-model directive on an input type=radio 1`] = `
|
||||
if (_11 || _11 === 0) {
|
||||
c10.push({text: _11});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`t-model directive on an input, type=checkbox 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1379,7 +1348,7 @@ exports[`t-model directive on an input, type=checkbox 1`] = `
|
||||
else {
|
||||
c4.push({text: \`no\`});
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1390,7 +1359,6 @@ exports[`t-slot directive can define and call slots 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1423,7 +1391,7 @@ exports[`t-slot directive can define and call slots 1`] = `
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1431,7 +1399,6 @@ exports[`t-slot directive can define and call slots 2`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1450,7 +1417,7 @@ exports[`t-slot directive can define and call slots 2`] = `
|
||||
if (slot5) {
|
||||
slot5.call(this, context.__owl__.parent, Object.assign({}, extra, {parentNode: c4, vars: extra.vars, parent: owner}));
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1585,7 +1552,6 @@ exports[`t-slot directive slots are rendered with proper context, part 2 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
var _1 = context['props'].to;
|
||||
let c2 = [], p2 = {key:2,attrs:{href: _1}};
|
||||
@@ -1595,7 +1561,7 @@ exports[`t-slot directive slots are rendered with proper context, part 2 1`] = `
|
||||
if (slot3) {
|
||||
slot3.call(this, context.__owl__.parent, Object.assign({}, extra, {parentNode: c2, vars: extra.vars, parent: owner}));
|
||||
}
|
||||
return result;
|
||||
return vn2;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1606,7 +1572,6 @@ exports[`t-slot directive slots are rendered with proper context, part 2 2`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
context = Object.create(context);
|
||||
const scope = Object.create(null);
|
||||
var h = this.h;
|
||||
@@ -1669,7 +1634,7 @@ exports[`t-slot directive slots are rendered with proper context, part 2 2`] = `
|
||||
}
|
||||
extra.promises.push(def8);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1691,7 +1656,6 @@ exports[`t-slot directive slots are rendered with proper context, part 3 1`] = `
|
||||
"function anonymous(context,extra
|
||||
) {
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
var _1 = context['props'].to;
|
||||
let c2 = [], p2 = {key:2,attrs:{href: _1}};
|
||||
@@ -1701,7 +1665,7 @@ exports[`t-slot directive slots are rendered with proper context, part 3 1`] = `
|
||||
if (slot3) {
|
||||
slot3.call(this, context.__owl__.parent, Object.assign({}, extra, {parentNode: c2, vars: extra.vars, parent: owner}));
|
||||
}
|
||||
return result;
|
||||
return vn2;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1712,7 +1676,6 @@ exports[`t-slot directive slots are rendered with proper context, part 3 2`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
context = Object.create(context);
|
||||
const scope = Object.create(null);
|
||||
var h = this.h;
|
||||
@@ -1776,7 +1739,7 @@ exports[`t-slot directive slots are rendered with proper context, part 3 2`] = `
|
||||
}
|
||||
extra.promises.push(def9);
|
||||
}
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -1800,7 +1763,6 @@ exports[`t-slot directive slots are rendered with proper context, part 4 1`] = `
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -1834,7 +1796,7 @@ exports[`t-slot directive slots are rendered with proper context, part 4 1`] = `
|
||||
def4 = def4.then(()=>{if (w5.__owl__.isDestroyed) {return};let pvnode=w5.__owl__.pvnode;c1[_3_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def4);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ exports[`props validation props are validated in dev mode (code snapshot) 1`] =
|
||||
let QWeb = this.constructor;
|
||||
let parent = context;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let c1 = [], p1 = {key:1};
|
||||
var vn1 = h('div', p1, c1);
|
||||
@@ -45,6 +44,6 @@ exports[`props validation props are validated in dev mode (code snapshot) 1`] =
|
||||
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
||||
}
|
||||
extra.promises.push(def3);
|
||||
return result;
|
||||
return vn1;
|
||||
}"
|
||||
`;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,6 @@ exports[`Link component can render simple cases 1`] = `
|
||||
) {
|
||||
let utils = this.constructor.utils;
|
||||
let owner = context;
|
||||
let result;
|
||||
var h = this.h;
|
||||
let _1 = utils.toObj({'router-link-active':context['isActive']});
|
||||
var _2 = context['href'];
|
||||
@@ -21,6 +20,6 @@ exports[`Link component can render simple cases 1`] = `
|
||||
if (slot4) {
|
||||
slot4.call(this, context.__owl__.parent, Object.assign({}, extra, {parentNode: c3, vars: extra.vars, parent: owner}));
|
||||
}
|
||||
return result;
|
||||
return vn3;
|
||||
}"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user