update playground
This commit is contained in:
parent
c707e226cd
commit
011e64c443
|
@ -38,7 +38,7 @@ class Todo extends Omi.Component {
|
|||
constructor(data) {
|
||||
super(data);
|
||||
this.data.length = this.data.items.length;
|
||||
this.childrenData = [ { items : this.data.items } ];
|
||||
this.listData = { items : this.data.items } ;
|
||||
}
|
||||
|
||||
add (evt) {
|
||||
|
@ -63,7 +63,7 @@ class Todo extends Omi.Component {
|
|||
return `
|
||||
<div>
|
||||
<h3>TODO</h3>
|
||||
<List name="list" />
|
||||
<List name="list" data="listData" />
|
||||
<form onsubmit="add(event)" >
|
||||
<input type="text" onchange="handleChange(this)" value="{{text}}" />
|
||||
<button>Add #{{length}}</button>
|
||||
|
|
Loading…
Reference in New Issue