vant-weapp/lib/icon/index.wxml
2019-08-08 17:16:45 +08:00

20 lines
535 B
Plaintext

<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="custom-class {{ classPrefix }} {{ utils.isSrc(name) ? 'van-icon--image' : classPrefix + '-' + name }}"
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + size + ';' : '' }}{{ customStyle }}"
bind:tap="onClick"
>
<van-info
wx:if="{{ info !== null }}"
info="{{ info }}"
custom-class="van-icon__info"
/>
<image
wx:if="{{ utils.isSrc(name) }}"
src="{{ name }}"
mode="aspectFit"
class="van-icon__image"
/>
</view>