mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
improve demo app
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
const template = `
|
||||
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>`;
|
||||
|
||||
export class Message extends odoo.core.Component {
|
||||
constructor(parent, props) {
|
||||
super(parent, props);
|
||||
this.inlineTemplate = template;
|
||||
this.widgets = { Counter };
|
||||
}
|
||||
|
||||
removeMessage() {
|
||||
|
||||
Reference in New Issue
Block a user