index.wxml 864 B

12345678910111213141516
  1. <view class="i-class i-alert {{'i-alert-'+type}} {{showIcon?'i-alert-with-icon':''}} {{desc?'i-alert-with-desc':''}}" wx:if="{{!closed}}"
  2. style="margin: {{fixMargin ? '0px' : '10px'}}">
  3. <view wx:if="{{ showIcon }}" class="i-alert-icon">
  4. <i-icon type="prompt" wx:if="{{ type === 'info' }}" size="{{desc?24:16}}"></i-icon>
  5. <i-icon type="success" wx:if="{{ type === 'success' }}" size="{{desc?24:16}}"></i-icon>
  6. <i-icon type="warning" wx:if="{{ type === 'warning' }}" size="{{desc?24:16}}"></i-icon>
  7. <i-icon type="delete" wx:if="{{ type === 'error' }}" size="{{desc?24:16}}"></i-icon>
  8. </view>
  9. <slot></slot>
  10. <view class="i-alert-desc">
  11. <slot name="desc"></slot>
  12. </view>
  13. <view class="i-alert-close" wx:if="{{ closable }}" bindtap="handleTap">
  14. <i-icon type="close"></i-icon>
  15. </view>
  16. </view>