index.wxml 1.6 KB

12345678910111213141516171819202122232425262728
  1. <!--components/picker/index.wxml-->
  2. <!-- 普通选择器 -->
  3. <view wx:if="{{!type}}">
  4. <picker class="picker {{isAudit?'dis-col':''}}" range="{{list}}" range-key="{{rangeKey}}" value="{{index}}" bindchange="chooseItem" disabled="{{isAudit}}">
  5. <text class="{{index == null?'noSelectCor':'normalCor'}}">{{index == null?placeholder[0]:list[index][rangeKey]}}</text>
  6. </picker>
  7. <van-icon class="icon" name="arrow" />
  8. </view>
  9. <!-- 日期时间选择器 -->
  10. <view wx:if="{{type === 'date-time'}}">
  11. <picker class="picker" mode="date" value="{{date}}" data-type="date" bindchange="chooseDateTime" disabled="{{isAudit}}">
  12. <text class="{{date == null?'noSelectCor':'normalCor'}}">{{date == null?placeholder[0]:date}}</text>
  13. </picker>
  14. <picker class="picker" mode="time" value="{{time}}" data-type="time" bindchange="chooseDateTime" disabled="{{isAudit}}">
  15. <text class="{{time == null?'noSelectCor':'normalCor'}}">{{time == null?placeholder[1]:time}}</text>
  16. </picker>
  17. <van-icon class="icon" name="arrow" />
  18. </view>
  19. <view wx:if="{{type==='radio'}}">
  20. <picker class="picker" range="{{list}}" range-key="{{rangeKey}}" value="{{date}}" bindchange="chooseItem" disabled="{{isAudit}}">
  21. <!-- <text>{{index == null?placeholder[0]:list[index][rangeKey]}}</text> -->
  22. <!-- <van-radio-group value="{{ date}}" class="radio-group" direction="horizontal" bind:change="chooseItem"> -->
  23. <radio name="1" label-class="text-white" checked-color="#4AA39E" custom-class="padding-sm">aaa</radio>
  24. <!-- </van-radio-group> -->
  25. </picker>
  26. <van-icon class="icon" name="arrow" />
  27. </view>