update playground

This commit is contained in:
kmdjs 2017-02-19 20:27:21 +08:00
parent c707e226cd
commit 011e64c443
1 changed files with 2 additions and 2 deletions

View File

@ -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>