collapse-panel.wxml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <wxs src="../common/utils.wxs" module="utils" />
  2. <view class="{{classPrefix}} {{prefix}}-class">
  3. <t-cell
  4. title="{{header}}"
  5. note="{{headerRightContent}}"
  6. bordered
  7. right-icon="{{ ultimateExpandIcon ? (expanded ? 'chevron-up' : 'chevron-down') : '' }}"
  8. class="{{classPrefix}}__title"
  9. t-class="{{classPrefix}}__header {{prefix}}-class-header"
  10. t-class-title="class-title {{ultimateDisabled ? 'class-title--disabled' : ''}}"
  11. t-class-note="class-note {{ultimateDisabled ? 'class-note--disabled' : ''}}"
  12. t-class-right-icon="class-right-icon {{ultimateDisabled ? 'class-right-icon--disabled' : ''}}"
  13. t-class-hover="class-header-hover"
  14. bind:click="onClick"
  15. >
  16. <slot name="header" slot="title" />
  17. <slot name="header-right-content" slot="note" />
  18. <slot name="expand-icon" slot="right-icon" />
  19. </t-cell>
  20. <view class="{{classPrefix}}__wrapper" style="height: {{contentHeight}};" bind:transitionend="onTransitionEnd">
  21. <view
  22. class="{{classPrefix}}__content {{classPrefix}}__content--{{expanded ? 'active' : ''}} {{prefix}}-class-content"
  23. >
  24. {{content}}
  25. <slot />
  26. <slot name="content" />
  27. </view>
  28. </view>
  29. </view>
  30. <!-- parentDisabled -->