index.wxml 535B

1234567891011121314151617181920
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. class="custom-class {{ classPrefix }} {{ utils.isSrc(name) ? 'van-icon--image' : classPrefix + '-' + name }}"
  4. style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + size + ';' : '' }}{{ customStyle }}"
  5. bind:tap="onClick"
  6. >
  7. <van-info
  8. wx:if="{{ info !== null }}"
  9. info="{{ info }}"
  10. custom-class="van-icon__info"
  11. />
  12. <image
  13. wx:if="{{ utils.isSrc(name) }}"
  14. src="{{ name }}"
  15. mode="aspectFit"
  16. class="van-icon__image"
  17. />
  18. </view>