index.axml 950 B

1234567891011121314151617
  1. <import-sjs from='../wxs/utils.sjs' name='utils'>
  2. </import-sjs><view style='{{ viewStyle }}' class="{{customClass}} {{ utils.bem('image', { round })}}" unscope-style=" " ref='saveChildRef0' onTap='antmoveAction' data-antmove-tap='onClick'>
  3. <image a:if='{{ !error }}' src='{{ src }}' mode='{{ mode }}' lazy-load='{{ lazyLoad }}' class='{{imageClass}} van-image__img' onLoad='onLoad' onError='onError'>
  4. </image>
  5. <view a:if='{{ loading && showLoading }}' class='{{loadingClass}} van-image__loading'>
  6. <slot a:if='{{ useLoadingSlot }}' name='loading'>
  7. </slot>
  8. <van-icon a:else name='photo' class='van-image__loading-icon' ref='saveChildRef1'>
  9. </van-icon>
  10. </view>
  11. <view a:if='{{ error && showError }}' class='{{errorClass}} van-image__error'>
  12. <slot a:if='{{ useErrorSlot }}' name='error'>
  13. </slot>
  14. <van-icon a:else name='photo-fail' class='van-image__error-icon' ref='saveChildRef2'>
  15. </van-icon>
  16. </view>
  17. </view>