index.axml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <view class='cell-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <view class="{{customClass}} {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}" hover-class='van-cell--hover {{hoverClass}}' hover-stay-time='70' style='{{ customStyle }}' onTap='antmoveAction' data-antmove-tap='onClick'>
  5. <van-icon a:if='{{ icon }}' name='{{ icon }}' class='van-cell__left-icon-wrap' custom-class='van-cell__left-icon' ref='saveChildRef1'>
  6. </van-icon>
  7. <slot a:else name='icon'>
  8. </slot>
  9. <view style="{{ (titleWidth ? 'max-width:' + titleWidth + ';min-width:' + titleWidth + ';' : '') + titleStyle }}" class='van-cell__title {{titleClass}}'>
  10. <block a:if='{{ title }}'>
  11. {{ title }}
  12. </block>
  13. <slot a:else name='title'>
  14. </slot>
  15. <view a:if='{{ label || useLabelSlot }}' class='van-cell__label {{labelClass}}'>
  16. <slot a:if='{{ useLabelSlot }}' name='label'>
  17. </slot>
  18. <block a:elif='{{ label }}'>
  19. {{ label }}
  20. </block>
  21. </view>
  22. </view>
  23. <view class='van-cell__value {{valueClass}}'>
  24. <block a:if='{{ value || value === 0 }}'>
  25. {{ value }}
  26. </block>
  27. <slot a:else >
  28. </slot>
  29. </view>
  30. <van-icon a:if='{{ isLink }}' name="{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}" class='van-cell__right-icon-wrap ' custom-class='van-cell__right-icon {{rightIconClass}}' ref='saveChildRef2'>
  31. </van-icon>
  32. <slot a:else name='right-icon'>
  33. </slot>
  34. <slot name='extra'>
  35. </slot>
  36. </view>
  37. </view>