custom.wxml 1.2 KB

123456789101112131415161718
  1. <van-dialog id="Dialog" use-slot title="定制" show="{{ show }}" asyncClose confirm-button-color='#085CDF' show-cancel-button>
  2. <view class="box">
  3. <view class="item" wx:for="{{arr}}" wx:key="name">
  4. <view class="label">
  5. {{item.name}}:
  6. </view>
  7. <view class="selectable" wx:if="{{item.type=='可选'}}">
  8. <view class="num {{product[item.name=='宽度'?'width':'length']==it.num?'active':''}}" wx:for="{{item.rowsdetail}}" wx:for-item='it' wx:for-index='i' wx:key="rowno" data-name="{{item.name=='宽度'?'width':'length'}}" data-num="{{it.num}}" catch:tap='selected'>
  9. {{it.num}}
  10. </view>
  11. </view>
  12. <view class="stepper" wx:else>
  13. <van-stepper value="{{ product[ item.name=='宽度'?'width':'length'] }}" input-width="60px" min="{{item.min}}" max="{{item.max}}" decimal-length="{{ item.decimalplaces }}" data-item="{{item}}" data-name="{{ item.name=='宽度'?'width':'length' }}" bind:plus='cahngeStepper' bind:blur='cahngeStepper' bind:minus='cahngeStepper' />
  14. <view class="explain">{{item.min+'mm ~ '+ item.max}}mm,<text wx:if="{{item.decimalplaces}}">保留{{item.decimalplaces}}位小数</text><text wx:else>不保留小数</text></view>
  15. </view>
  16. </view>
  17. </view>
  18. </van-dialog>