timePicker.wxml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!--components/timePicker/timePicker.wxml-->
  2. <!-- 自定义时间筛选器 -->
  3. <view hidden="{{!pickerShow}}">
  4. <view class="picker-container {{pickerShow?'show_picker':'hide_picker'}}" animation="{{animationData}}">
  5. <view class="btn-box" catchtouchmove="onCatchTouchMove">
  6. <view class="pick_btn" bindtap="hideModal">取消</view>
  7. <view class='pick_btn' style="color: #19f" bindtap="onConfirm">确定</view>
  8. </view>
  9. <view>
  10. <picker-view class='sensorTypePicker' indicator-style='height: 35px;' bindchange="changeStartDateTime"
  11. value="{{startValue}}" style="height: {{endDate?'120px':'250px'}};" bindpickstart="handlePickStart" bindpickend="handlePickEnd">
  12. <picker-view-column hidden="{{!isYear}}" style="min-width: 70px;flex-shrink: 0">
  13. <view class='picker-item' wx:for="{{startYearList}}" wx:key='*this'>{{item}}年</view>
  14. </picker-view-column>
  15. <picker-view-column hidden="{{!isMonth}}">
  16. <view class='picker-item' wx:for="{{startMonthList}}" wx:key='*this'>{{item}}月</view>
  17. </picker-view-column>
  18. <picker-view-column hidden="{{!isDay}}">
  19. <view class='picker-item' wx:for="{{startDayList}}" wx:key='*this'>{{item}}日</view>
  20. </picker-view-column>
  21. <picker-view-column hidden="{{!isTime}}">
  22. <view class='picker-item' wx:for="{{startHourList}}" wx:key='*this'>{{item}}时</view>
  23. </picker-view-column>
  24. <picker-view-column hidden="{{!isMin}}">
  25. <view class='picker-item' wx:for="{{startMinuteList}}" wx:key='*this'>{{item}}分</view>
  26. </picker-view-column>
  27. <picker-view-column hidden="{{!isSecond}}">
  28. <view class='picker-item' wx:for="{{startSecondList}}" wx:key='*this'>{{item}}秒</view>
  29. </picker-view-column>
  30. </picker-view>
  31. </view>
  32. <view wx:if="{{endDate}}">
  33. <view class='to' style='margin-top: 4px;margin-bottom: 4px;'>至</view>
  34. <picker-view class='sensorTypePicker' indicator-style='height: 35px;' bindchange="changeEndDateTime" bindpickstart="handlePickStart" bindpickend="handlePickEnd"
  35. value="{{endValue}}">
  36. <picker-view-column hidden="{{!isYear}}" style="min-width: 70px;flex-shrink: 0">
  37. <view class='picker-item' wx:for="{{endYearList}}" wx:key='*this' style="min-width: 70px;">{{item}}年</view>
  38. </picker-view-column>
  39. <picker-view-column hidden="{{!isMonth}}">
  40. <view class='picker-item' wx:for="{{endMonthList}}" wx:key='*this'>{{item}}月</view>
  41. </picker-view-column>
  42. <picker-view-column hidden="{{!isDay}}">
  43. <view class='picker-item' wx:for="{{endDayList}}" wx:key='*this'>{{item}}日</view>
  44. </picker-view-column>
  45. <picker-view-column hidden="{{!isTime}}" >
  46. <view class='picker-item' wx:for="{{endHourList}}" wx:key='*this'>{{item}}时</view>
  47. </picker-view-column>
  48. <picker-view-column hidden="{{!isMin}}">
  49. <view class='picker-item' wx:for="{{endMinuteList}}" wx:key='*this'>{{item}}分</view>
  50. </picker-view-column>
  51. <picker-view-column hidden="{{!isSecond}}">
  52. <view class='picker-item' wx:for="{{startSecondList}}" wx:key='*this'>{{item}}秒</view>
  53. </picker-view-column>
  54. </picker-view>
  55. </view>
  56. <!-- <view class='sure' bindtap="onConfirm">确定</view> -->
  57. </view>
  58. <!-- 遮罩 -->
  59. <view class="sensorType-screen" bindtap="hideModal" catchtouchmove="onCatchTouchMove" animation="{{animationOpacity}}"/>
  60. </view>