index.wxml 867B

12345678910111213141516171819202122232425262728293031323334
  1. <van-overlay
  2. wx:if="{{ mask || forbidClick }}"
  3. show="{{ show }}"
  4. mask="{{ mask }}"
  5. z-index="{{ zIndex }}"
  6. />
  7. <van-transition
  8. show="{{ show }}"
  9. custom-style="z-index: {{ zIndex }}"
  10. custom-class="van-toast__container"
  11. >
  12. <view
  13. class="van-toast van-toast--{{ type === 'text' ? 'text' : 'icon' }} van-toast--{{ position }}"
  14. catch:touchmove="noop"
  15. >
  16. <!-- text only -->
  17. <text wx:if="{{ type === 'text' }}">{{ message }}</text>
  18. <!-- with icon -->
  19. <block wx:else>
  20. <van-loading
  21. wx:if="{{ type === 'loading' }}"
  22. color="white"
  23. type="{{ loadingType }}"
  24. custom-class="van-toast__loading"
  25. />
  26. <van-icon wx:else class="van-toast__icon" name="{{ type }}" />
  27. <text wx:if="{{ message }}" class="van-toast__text">{{ message }}</text>
  28. </block>
  29. <slot />
  30. </view>
  31. </van-transition>