vant-weapp/dist/toast/index.wxml
2018-08-07 15:10:21 +08:00

31 lines
694 B
Plaintext

<view
class="van-toast {{ !message ? 'van-toast--notitle' : '' }}"
wx:if="{{ show }}"
bindtap="clearZanToast"
>
<!-- icon 展示 -->
<block
wx:if="{{ icon || image }}"
>
<view
wx:if="{{ image }}"
class="van-toast__icon van-toast__icon-image"
style="background-image: url({{ image }});"
></view>
<view
wx:elif="{{ icon === 'loading' }}"
class="van-toast__icon van-toast__icon-loading"
>
<view class="van-loading"></view>
</view>
<van-icon
wx:else
type="{{ icon }}"
class="van-toast__icon"
></van-icon>
</block>
<!-- 文案展示 -->
<view wx:if="{{ message }}">{{ message }}</view>
</view>