index.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--pages/style/style.wxml-->
  2. <view class="main">
  3. <view style="background:#aaa;margin-bottom:20px;">
  4. <view class="titleTop">tab选项卡效果</view>
  5. <view class="swiper-tab">
  6. <view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">选项1</view>
  7. <view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">选项2</view>
  8. </view>
  9. <swiper current="{{currentTab}}" bindchange="swiperTab">
  10. <swiper-item>
  11. <view>选项1</view>
  12. </swiper-item>
  13. <swiper-item>
  14. <view>选项2</view>
  15. </swiper-item>
  16. </swiper>
  17. </view>
  18. <view style="background:#bbb;margin-bottom:20px;">
  19. <view class="titleTop">公司介绍上下切换</view>
  20. <view class="buttonChange">
  21. <button class="hide{{showView?'show':''}}" bindtap="onChangeShowState">隐藏</button>
  22. <button class="hide{{showView?'':'show'}}" bindtap="onChangeShowState">显示</button>
  23. </view>
  24. <view class="hide{{showView?'show':''}} hideStyle">
  25. <text class="text">隐藏</text>
  26. </view>
  27. <view class="hide{{showView?'':'show'}} hideStyle">
  28. <text class="text">显示</text>
  29. </view>
  30. </view>
  31. <view style="background:#ccc;margin-bottom:20px;">
  32. <view class="titleTop">页面跳转</view>
  33. <view bindtap="onDetail" id="{{jobFair._id}}">跳转</view>
  34. </view>
  35. <view style="background:#ddd;margin-bottom:20px;">
  36. <view class="titleTop">列表循环</view>
  37. <view wx:key="unique" wx:for="{{list}}" wx:for-item="item">
  38. <view bindtap="bindtap" id="{{list._id}}">
  39. <view>列表标题:<text>{{item.title}}</text></view>
  40. </view>
  41. </view>
  42. </view>
  43. <view>
  44. <view class='form-list'>
  45. <text>运单号码</text>
  46. <input type='text' value='{{scanCodeMsg}}'></input>
  47. <image class='scan' bindtap='scanCode' src='/pages/images/test.jpg' mode='widthFix'></image>
  48. </view>
  49. </view>
  50. <view>
  51. <button style="margin:30rpx;" bindtap="chooseimage">获取图片</button>
  52. <image src="{{tempFilePaths }}" mode="aspecFill" style="width: 100%; height: 450rpx" />
  53. </view>
  54. </view>