vant-weapp/dist/toast/index.wxml
2018-08-19 10:49:09 +08:00

24 lines
692 B
Plaintext

<view
wx:if="{{ show && (mask || forbidClick) }}"
class="van-toast__overlay {{ mask ? 'van-toast__overlay--mask' : '' }}"
/>
<view
wx:if="{{ show }}"
class="van-toast van-toast--{{ type === 'text' ? 'text' : 'icon' }} van-toast--{{ position }}"
>
<!-- text only -->
<view wx:if="{{ type === 'text' }}">{{ message }}</view>
<!-- with icon -->
<block wx:else>
<van-loading
wx:if="{{ type === 'loading' }}"
color="white"
type="{{ loadingType }}"
custom-class="van-toast__loading"
/>
<van-icon wx:else class="van-toast__icon" name="{{ type }}" />
<view wx:if="{{ message }}" class="van-toast__text">{{ message }}</view>
</block>
</view>