collapse-panel.wxml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. <wxs src="../common/utils.wxs" module="utils" />
  2. <view style="{{ customStyle }}" class="{{classPrefix}} {{classPrefix}}--{{placement}} {{prefix}}-class">
  3. <view
  4. class="{{classPrefix}}__title"
  5. aria-role="button"
  6. aria-expanded="{{expanded}}"
  7. aria-disabled="{{ultimateDisabled}}"
  8. bind:tap="onClick"
  9. >
  10. <t-cell
  11. title="{{header}}"
  12. note="{{headerRightContent}}"
  13. bordered
  14. right-icon="{{ ultimateExpandIcon ? (expanded ? 'chevron-up' : 'chevron-down') : '' }}"
  15. t-class="{{classPrefix}}__header {{classPrefix}}__header--{{placement}} {{prefix}}-class-header"
  16. t-class-title="class-title {{ultimateDisabled ? 'class-title--disabled' : ''}}"
  17. t-class-note="class-note {{ultimateDisabled ? 'class-note--disabled' : ''}}"
  18. t-class-right-icon="class-right-icon {{classPrefix}}__arrow--{{placement}} {{ultimateDisabled ? 'class-right-icon--disabled' : ''}}"
  19. t-class-hover="class-header-hover"
  20. >
  21. <slot name="header" slot="title" />
  22. <slot name="header-right-content" slot="note" />
  23. <slot name="expand-icon" slot="right-icon" />
  24. </t-cell>
  25. </view>
  26. <view class="{{classPrefix}}__wrapper" animation="{{animation}}" aria-hidden="{{expanded ? '' : true}}">
  27. <view class="{{classPrefix}}__content {{prefix}}-class-content">
  28. {{content}}
  29. <slot />
  30. <slot name="content" />
  31. </view>
  32. </view>
  33. </view>