cascader.wxml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <t-popup visible="{{visible}}" placement="bottom" bind:visible-change="hide">
  2. <view style="{{ customStyle }}" class="{{name}}">
  3. <view class="{{name}}__title">
  4. <slot name="title" />
  5. {{title}}
  6. </view>
  7. <view class="{{name}}__close-btn" bind:tap="hide">
  8. <slot name="closeBtn" />
  9. <t-icon wx:if="{{closeBtn}}" size="24" name="close" />
  10. </view>
  11. <view class="{{name}}__content">
  12. <block wx:if="{{steps && steps.length}}">
  13. <view wx:if="{{theme == 'step'}}" class="{{name}}__steps">
  14. <view wx:for="{{steps}}" wx:key="index" class="{{name}}__step" bind:tap="onStepClick" data-index="{{index}}">
  15. <view
  16. class="{{name}}__step-dot {{name}}__step-dot--{{item !== defaultOptionLabel ? 'active' : ''}} {{name}}__step-dot--{{index === steps.length - 1 ? 'last' : ''}}"
  17. ></view>
  18. <view class="{{name}}__step-label {{name}}__step-label--{{index === stepIndex ? 'active' : ''}}">
  19. {{ item }}
  20. </view>
  21. <t-icon name="chevron-right" size="22" class="{{name}}__step-arrow" />
  22. </view>
  23. </view>
  24. <block wx:if="{{theme == 'tab'}}">
  25. <t-tabs id="tabs" value="{{stepIndex}}" bind:change="onTabChange" space-evenly="{{false}}">
  26. <t-tab-panel wx:for="{{steps}}" wx:key="index" value="{{index}}" label="{{item}}" />
  27. </t-tabs>
  28. </block>
  29. </block>
  30. <view wx:if="{{ subTitles && subTitles[stepIndex] }}" class="{{name}}__options-title"
  31. >{{subTitles[stepIndex]}}</view
  32. >
  33. <view
  34. class="{{name}}__options-container"
  35. style="width: {{items.length + 1}}00vw; transform: translateX(-{{stepIndex}}00vw)"
  36. >
  37. <scroll-view wx:for="{{items}}" wx:for-item="options" wx:key="index" class="{{name}}__options" scroll-y>
  38. <t-radio-group
  39. value="{{selectedValue[index]}}"
  40. keys="{{keys}}"
  41. options="{{options}}"
  42. bind:change="handleSelect"
  43. data-level="{{index}}"
  44. align="right"
  45. icon="line"
  46. borderless
  47. >
  48. </t-radio-group>
  49. </scroll-view>
  50. </view>
  51. </view>
  52. </view>
  53. </t-popup>