mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] examples: update benchmarks code to new structure
This commit is contained in:
@@ -25,7 +25,7 @@ const template = `
|
|||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
export class App extends owl.core.Component {
|
export class App extends owl.Component {
|
||||||
constructor(parent, props) {
|
constructor(parent, props) {
|
||||||
super(parent, props);
|
super(parent, props);
|
||||||
this.inlineTemplate = template;
|
this.inlineTemplate = template;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export class Counter extends owl.core.Component {
|
export class Counter extends owl.Component {
|
||||||
inlineTemplate = `
|
inlineTemplate = `
|
||||||
<div>
|
<div>
|
||||||
<button t-on-click="increment(-1)">-</button>
|
<button t-on-click="increment(-1)">-</button>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { App } from "./app.js";
|
|||||||
|
|
||||||
function createApp(el) {
|
function createApp(el) {
|
||||||
const env = {
|
const env = {
|
||||||
qweb: new owl.core.QWeb()
|
qweb: new owl.QWeb()
|
||||||
};
|
};
|
||||||
const app = new App(env, { initialState: 13 });
|
const app = new App(env, { initialState: 13 });
|
||||||
app.mount(el);
|
app.mount(el);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Counter } from "./counter.js";
|
import { Counter } from "./counter.js";
|
||||||
|
|
||||||
export class Message extends owl.core.Component {
|
export class Message extends owl.Component {
|
||||||
inlineTemplate = `
|
inlineTemplate = `
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<span class="author"><t t-esc="props.author"/></span>
|
<span class="author"><t t-esc="props.author"/></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user