stepper.wxml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <view
  2. class="{{classPrefix}} {{classPrefix}}--{{theme === 'grey' ? 'pure' : 'normal'}} {{ disabled ? prefix + '-is-disabled': ''}} {{prefix}}-class"
  3. >
  4. <view
  5. class="{{classPrefix}}__minus {{prefix}}-class-minus {{ disabled || disableMinus || currentValue <= min ? prefix + '-is-disabled': ''}} hotspot-expanded relative"
  6. catchtap="minusValue"
  7. >
  8. <t-icon
  9. name="remove"
  10. class="{{classPrefix}}__minus-icon"
  11. color="{{ disabled || disableMinus || currentValue <= min ? '#ccc': '#444'}}"
  12. size="{{theme === 'grey' ? '32rpx' : '40rpx'}}"
  13. />
  14. </view>
  15. <input
  16. class="{{classPrefix}}__input {{prefix}}-class-input"
  17. style="width: {{inputWidth || 100}}rpx"
  18. disabled="{{ disabled || disableInput }}"
  19. type="number"
  20. value="{{ currentValue }}"
  21. catchinput="inputHandle"
  22. catchfocus="focusHandle"
  23. catchblur="blurHandle"
  24. />
  25. <view
  26. class="{{classPrefix}}__plus {{prefix}}-class-plus {{ disabled || disablePlus|| currentValue >= max ? prefix + '-is-disabled': ''}} hotspot-expanded relative"
  27. catchtap="plusValue"
  28. >
  29. <t-icon
  30. name="add"
  31. class="{{classPrefix}}__plus-icon"
  32. color="{{ disabled || disablePlus|| currentValue >= max ? '#ccc': '#444'}}"
  33. size="{{theme === 'grey' ? '32rpx' : '40rpx'}}"
  34. />
  35. </view>
  36. </view>