短通知 + 上部消息
This commit is contained in:
36
components/toast/toast.wxml
Normal file
36
components/toast/toast.wxml
Normal file
@@ -0,0 +1,36 @@
|
||||
<view
|
||||
wx:if="{{realVisible}}"
|
||||
class="{{classPrefix}} {{prefix}}-class {{transitionClass}} {{classPrefix}}--{{direction}}"
|
||||
style="top: {{placement === 'top' ? '25%' : placement === 'bottom' ? '75%': '45%'}}"
|
||||
bind:transitionend="onTransitionEnd"
|
||||
>
|
||||
<view class="{{classPrefix}}__content {{classPrefix}}__content--{{direction}}">
|
||||
<t-icon
|
||||
wx:if="{{typeMapIcon!=='loading' || icon}}"
|
||||
name="{{typeMapIcon || icon}}"
|
||||
class="{{classPrefix}}__icon {{classPrefix}}__icon--{{direction}}"
|
||||
color="#fff"
|
||||
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 + '__text--' + direction : ''}}"
|
||||
>{{message}}</view
|
||||
>
|
||||
<slot name="message" />
|
||||
</view>
|
||||
</view>
|
||||
<t-overlay
|
||||
visible="{{realVisible && (showOverlay || preventScrollThrough)}}"
|
||||
z-index="{{overlayProps.zIndex}}"
|
||||
backgroundColor="{{preventScrollThrough ? 'transparent' : overlayProps.backgroundColor}}"
|
||||
preventScrollThrough="{{preventScrollThrough || overlayProps.preventScrollThrough}}"
|
||||
/>
|
||||
Reference in New Issue
Block a user