home.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!--pages/home/home.wxml-->
  2. <view>
  3. <navigator url="/pages/detail/detail">详情</navigator>
  4. <button bind:tap="handleJump" class="btn">跳转</button>
  5. <headers></headers>
  6. <button bind:tap="handleShow" class="btn">展示</button>
  7. <!-- 表单绑定 -->
  8. <input type="text" class="inp" value="{{users}}" bindinput="handleInput" />
  9. <!-- <input type="radio"/> -->
  10. <radio-group bindchange="handleChange">
  11. <radio value="man" />男
  12. <radio value="woman" />女
  13. </radio-group>
  14. <button bind:tap="handleRead" class="btn">读取</button>
  15. <!-- <checkbox-group bindchange="">
  16. <checkbox value=""/>
  17. </checkbox-group> -->
  18. <view class="names">我叫:{{name}}</view>
  19. <button bind:tap="handleChange">修改</button>
  20. <view wx:for="{{list}}" wx:key="index" >
  21. <view bind:tap="goDetail" data-id="{{item.id}}">{{item.id}}.我叫{{item.name}},我使用{{item.desc}}</view>
  22. </view>
  23. <view>
  24. <view>当前分数:{{score}}</view>
  25. <view wx:if="{{score < 60}}">不及格</view>
  26. <view wx:elif="{{score < 80}}">及格</view>
  27. <view wx:elif="{{score < 90}}">良好</view>
  28. <view wx:else>优秀</view>
  29. </view>
  30. <button bind:tap="handleScore" class="btn">修改分数</button>
  31. <!-- home -->
  32. <template name="aaa">
  33. <view>姓名:{{names}}</view>
  34. </template>
  35. </view>
  36. <view class="box" bind:tap="handleBox">
  37. <view class="box1" catch:tap="handleBox1"> </view>
  38. </view>
  39. <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
  40. <block wx:for="{{background}}" wx:key="*this">
  41. <swiper-item>
  42. <view class="swiper-item {{item}}"></view>
  43. </swiper-item>
  44. </block>
  45. </swiper>
  46. <view class="page-section-spacing">
  47. <scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
  48. <view id="demo1" class="scroll-view-item_H demo-1"></view>
  49. <view id="demo2" class="scroll-view-item_H demo-2"></view>
  50. <view id="demo3" class="scroll-view-item_H demo-3"></view>
  51. </scroll-view>
  52. </view>