mpTodo.wxml 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <view class="container">
  2. <view class="todo-input">
  3. <input type="text" bindinput="inpHandle" value="{{inpVal}}" />
  4. </view>
  5. <view>
  6. <button type="primary" bind:tap="addHandle">添加待办事项</button>
  7. <button type="default" bind:tap="doneCheckHandle">完成选中项</button>
  8. </view>
  9. <view>
  10. <switch checked="" bindchange="changeTypeHandle"/>
  11. <text>已完成</text>
  12. <text>未完成</text>
  13. </view>
  14. <view class="list-bar">
  15. <checkbox-group bindchange="checkBoxHandle">
  16. <view class="list-item" wx:for="{{todoData}}" wx:key="_id">
  17. <view>
  18. <checkbox value="{{item._id}}" />
  19. </view>
  20. <view>{{index +1}}</view>
  21. <view>{{item.title}}</view>
  22. <view>
  23. <button data-id="{{item._id}}" type="warn" size="mini" bind:tap="doneHandle">完成</button>
  24. </view>
  25. </view>
  26. </checkbox-group>
  27. <view wx:if="{{allData}}" class="show-more">加载完成</view>
  28. <view wx:else class="show-more" bind:tap="showMoreHandle">更多数据</view>
  29. </view>
  30. </view>