vant-weapp/packages/icon/index.wxml
2020-11-29 18:24:26 +08:00

22 lines
511 B
Plaintext

<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./computed.wxs" module="computed" />
<view
class="{{ computed.rootClass({ classPrefix, name }) }}"
style="{{ computed.rootStyle({ customStyle, color, size }) }}"
bind:tap="onClick"
>
<van-info
wx:if="{{ info !== null || dot }}"
dot="{{ dot }}"
info="{{ info }}"
custom-class="van-icon__info"
/>
<image
wx:if="{{ computed.isImage(name) }}"
src="{{ name }}"
mode="aspectFit"
class="van-icon__image"
/>
</view>