<view>
  <view>
    <view class="title">todos</view>
    <!-- <image class="github" bindtap="gotoAbout" src="{{anonymousState__temp}}"></image> -->
    <view class="form">
      <input class="new-todo" model:value="{{todoTitle}}" placeholder="What needs to be done?" autofocus="" />
      <button class="add-btn" bindtap="addTodo">确定</button>
    </view>
    <view class="todo-list">
      <block wx:if="{{type === 'all' || type === 'active' && !item.done || type === 'done' && item.done}}" wx:key="id" wx:for="{{todos}}" wx:for-item="item">
        <view class="{{'todo-item' + (item.done ? ' done' : '')}}">
          <view class="toggle" data-id="{{item.id}}" bindtap="toggle"></view>
          <text>{{item.title}}</text>
          <view class="delete" data-id="{{item.id}}" bindtap="destroy"></view>
        </view>
      </block>
    </view>
    <todo-footer bindfilter="filter" bindclear="clear" left="{{left}}" done="{{done}}" type="{{type}}"></todo-footer>
  </view>
  <!-- <my-cop count="{{count}}" bind:countchanged="onCountChanged"></my-cop>
  <view>日志数量{{logsSize}}</view> -->
</view>
