home.wxml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. <van-button type="default">默认按钮</van-button>
  19. <van-button type="primary">主要按钮</van-button>
  20. <van-button type="info">信息按钮</van-button>
  21. <van-button type="warning">警告按钮</van-button>
  22. <van-button type="danger">危险按钮</van-button>
  23. <view class="names">我叫:{{name}}</view>
  24. <button bind:tap="handleChange">修改</button>
  25. <view wx:for="{{list}}" wx:key="index">
  26. <view bind:tap="goDetail" data-id="{{item.id}}">{{item.id}}.我叫{{item.name}},我使用{{item.desc}}</view>
  27. </view>
  28. <view>
  29. <view>当前分数:{{score}}</view>
  30. <view wx:if="{{score < 60}}">不及格</view>
  31. <view wx:elif="{{score < 80}}">及格</view>
  32. <view wx:elif="{{score < 90}}">良好</view>
  33. <view wx:else>优秀</view>
  34. </view>
  35. <button bind:tap="handleScore" class="btn">修改分数</button>
  36. <!-- home -->
  37. <template name="aaa">
  38. <view>姓名:{{names}}</view>
  39. </template>
  40. </view>
  41. <view class="box" bind:tap="handleBox">
  42. <view class="box1" catch:tap="handleBox1"> </view>
  43. </view>
  44. <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
  45. <block wx:for="{{background}}" wx:key="*this">
  46. <swiper-item>
  47. <view class="swiper-item {{item}}"></view>
  48. </swiper-item>
  49. </block>
  50. </swiper>
  51. <view class="page-section-spacing">
  52. <scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
  53. <view id="demo1" class="scroll-view-item_H demo-1"></view>
  54. <view id="demo2" class="scroll-view-item_H demo-2"></view>
  55. <view id="demo3" class="scroll-view-item_H demo-3"></view>
  56. </scroll-view>
  57. </view>