Files
danyang-match/miniapp/components/message-bubble/index.wxml
T

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2026-09-09 22:05:00 +08:00
<view class="ui-bubble ui-bubble--{{bubbleType}}">
<view wx:if="{{showTime && sentAtText}}" class="ui-bubble__time">
<text>{{sentAtText}}</text>
</view>
<block wx:if="{{bubbleType === 'system'}}">
<view class="ui-bubble__system">{{content}}</view>
</block>
<block wx:else>
<view class="ui-bubble__row">
<ui-avatar
wx:if="{{bubbleType === 'other' && showAvatar}}"
src="{{avatarUrl}}"
size="sm"
/>
<view class="ui-bubble__content-wrap">
<view class="ui-bubble__content">{{content}}</view>
<view
wx:if="{{bubbleType === 'self' && sendStatus === 'failed'}}"
class="ui-bubble__retry"
catchtap="onRetry"
>重发</view>
<view wx:if="{{bubbleType === 'self' && sendStatus === 'sending'}}" class="ui-bubble__sending">
<view class="ui-bubble__sending-dot"></view>
</view>
</view>
<ui-avatar
wx:if="{{bubbleType === 'self' && showAvatar}}"
src="{{avatarUrl}}"
size="sm"
/>
</view>
</block>
</view>