oak-general-business/app/miniprogram_npm/tdesign/toast/toast.wxml

38 lines
1.3 KiB
Plaintext

<block>
<view
wx:if="{{inserted}}"
class="{{classPrefix}}__content t-class {{classPrefix + '__' + direction}} {{classPrefix + '--' + show ? 'enter' : 'leave'}}"
style="top: {{placement === 'top' ? '25%' : placement === 'bottom' ? '75%': '45%'}}"
>
<t-icon
wx:if="{{typeMapIcon!=='loading' || icon}}"
name="{{typeMapIcon || icon}}"
class="{{classPrefix + '__' + direction}}-icon"
color="#ffffff"
size="{{direction === 'row' ? '42rpx' : '96rpx'}}"
/>
<t-loading
wx:if="{{typeMapIcon === 'loading'}}"
theme="circular"
size="{{direction === 'row' ? '42rpx' : '96rpx'}}"
loading
inherit-color
style="color: white"
layout="vertical"
/>
<slot name="icon" />
<view class="{{classPrefix}}__text {{typeMapIcon || icon ? classPrefix + '__' + direction + '-text' : ''}}"
>{{message}}</view
>
<slot name="message" />
</view>
<view class="{{classPrefix}}__bg" catchtouchmove="true" wx:if="{{preventScrollThrough && inserted}}" />
<t-overlay
wx:if="{{inserted && showOverlay}}"
z-index="{{overlayProps.zIndex}}"
backgroundColor="{{overlayProps.backgroundColor}}"
preventScrollThrough="{{overlayProps.preventScrollThrough}}"
visible
/>
</block>