index.wxml 954 B

12345678910111213141516
  1. <view class="i-toast-mask" wx:if="{{ visible && mask }}" bindtap="handleHide"></view>
  2. <view class="i-class i-toast" wx:if="{{ visible }}">
  3. <block wx:if="{{ type !== 'default' }}">
  4. <view class="i-toast-type">
  5. <i-icon i-class="i-toast-icon" type="success" wx:if="{{ type === 'success' }}"></i-icon>
  6. <i-icon i-class="i-toast-icon" type="prompt" wx:elif="{{ type === 'warning' }}"></i-icon>
  7. <i-icon i-class="i-toast-icon" type="delete" wx:elif="{{ type === 'error' }}"></i-icon>
  8. <view class="i-toast-icon i-toast-loading" wx:elif="{{ type === 'loading' }}"></view>
  9. </view>
  10. </block>
  11. <block wx:else>
  12. <i-icon i-class="i-toast-icon" type="{{ icon }}" wx:if="{{ icon }}"></i-icon>
  13. <image class="i-toast-image" src="{{ image }}" wx:if="{{ image }}" mode="aspectFit"></image>
  14. </block>
  15. <view class="i-toast-content" wx:if="{{ content }}">{{ content }}</view>
  16. </view>