mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
rename demo example into benchmarks
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Counter } from "./counter.js";
|
||||
|
||||
export class Message extends odoo.core.Component {
|
||||
inlineTemplate = `
|
||||
<div class="message">
|
||||
<span class="author"><t t-esc="props.author"/></span>
|
||||
<span class="msg"><t t-esc="props.msg"/></span>
|
||||
<button class="remove" t-on-click="removeMessage">Remove</button>
|
||||
<t t-widget="Counter" t-props="{initialState: props.id}"/>
|
||||
</div>`;
|
||||
|
||||
constructor(parent, props) {
|
||||
super(parent, props);
|
||||
this.widgets = { Counter };
|
||||
}
|
||||
|
||||
removeMessage() {
|
||||
this.trigger("remove_message", {
|
||||
id: this.props.id
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user