index.axml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <view class='card-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <view class='{{customClass}} van-card'>
  5. <view class="{{ utils.bem('card__header', { center: centered }) }}">
  6. <view class='van-card__thumb' onTap='antmoveAction' data-antmove-tap='onClickThumb'>
  7. <image a:if='{{ thumb }}' src='{{ thumb }}' mode='{{ thumbMode }}' lazy-load='{{ lazyLoad }}' class='van-card__img {{thumbClass}}'>
  8. </image>
  9. <slot a:else name='thumb'>
  10. </slot>
  11. <van-tag a:if='{{ tag }}' mark=" " type='danger' custom-class='van-card__tag' ref='saveChildRef1'>
  12. {{ tag }}
  13. </van-tag>
  14. <slot a:else name='tag'>
  15. </slot>
  16. </view>
  17. <view class="van-card__content {{ utils.bem('card__content', { center: centered }) }}">
  18. <view>
  19. <view a:if='{{ title }}' class='van-card__title {{titleClass}}'>
  20. {{ title }}
  21. </view>
  22. <slot a:else name='title'>
  23. </slot>
  24. <view a:if='{{ desc }}' class='van-card__desc {{descClass}}'>
  25. {{ desc }}
  26. </view>
  27. <slot a:else name='desc'>
  28. </slot>
  29. <slot name='tags'>
  30. </slot>
  31. </view>
  32. <view class='van-card__bottom'>
  33. <slot name='price-top'>
  34. </slot>
  35. <view a:if='{{ price || price === 0 }}' class='van-card__price {{priceClass}}'>
  36. <text>
  37. {{ currency }} </text> <text class='van-card__price-integer'>
  38. {{ integerStr }} </text> <text class='van-card__price-decimal'>
  39. {{ decimalStr }} </text>
  40. </view> <slot a:else name='price'>
  41. </slot>
  42. <view a:if='{{ originPrice || originPrice === 0 }}' class='van-card__origin-price {{originPriceClass}}'>
  43. {{ currency }} {{ originPrice }}
  44. </view>
  45. <slot a:else name='origin-price'>
  46. </slot>
  47. <view a:if='{{ num }}' class='van-card__num {{numClass}}'>
  48. x {{ num }}
  49. </view>
  50. <slot a:else name='num'>
  51. </slot>
  52. <slot name='bottom'>
  53. </slot>
  54. </view>
  55. </view>
  56. </view> <view class='van-card__footer'>
  57. <slot name='footer'>
  58. </slot>
  59. </view>
  60. </view>
  61. </view>