index.wxml 1017 B

12345678910111213141516171819202122
  1. <!--components/radioAndcheckbox/index.wxml-->
  2. <van-popup show="{{ chooseBuilding }}" position="bottom" custom-style="height: 50%;">
  3. <view class="topTab">
  4. <text class="cancel" bindtap="crossBuilding">取消</text>
  5. <text class="sure" bindtap="sure">确定</text>
  6. </view>
  7. <radio-group wx:if="{{type==='radio'}}" bindchange="chooserRadio">
  8. <label class="group" wx:for="{{list}}" wx:key="{{item.name}}">
  9. <radio value='{{item.name}}' data-name="{{item.name}}" checked="{{item.name==name}}" />{{item.name}}
  10. </label>
  11. </radio-group>
  12. <checkbox-group wx:if="{{type==='checkbox'}}" class="box" bindchange="checkboxChange">
  13. <view class="{{className=='block'?'block':'group group1'}}" wx:for="{{list}}" wx:key="{{item.name}}">
  14. <label data-index="{{index}}">
  15. <checkbox value="{{sn?item.sn:item.name}}" checked="{{item.checked}}" />{{item.name}}
  16. </label>
  17. </view>
  18. </checkbox-group>
  19. </van-popup>