chat.wxml 1.5 KB

1
  1. <view class="chat-box"><block wx:if="{{postData.loading}}"><view class="chat-tips">{{''+postData.loadText+''}}</view></block><view class="chat-list"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view id="{{'msg-'+item.$orig.time}}"><view class="{{['chat-item',item.$orig.from==nowUserId?'push':'pull']}}"><image class="avatar" src="{{item.$orig.fromUserInfo.avatarUrl}}" mode="aspectFill"></image><view class="content-box"><block wx:if="{{item.$orig.type==='text'}}"><view class="content">{{item.$orig.body.text}}</view></block><block wx:else><image class="{{[item.m0]}}" src="{{item.$orig.body.thumbnailUrl}}" mode="aspectFill" data-event-opts="{{[['tap',[['previewImage',['$0'],[[['chatList','',index,'body.originalUrl']]]]]]]}}" bindtap="__e"></image></block></view></view></view></block></view><view class="chat-submit"><input class="message-content" type="text" placeholder="请输入聊天内容" placeholder-class="message-placeholder" cursor-spacing="{{6}}" data-event-opts="{{[['input',[['__set_model',['','message','$event',[]]]]]]}}" value="{{message}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['sendImage',['$event']]]]]}}" class="send-image send-button" bindtap="__e"><uni-icons vue-id="6e1d75c0-1" type="images-filled" color="#8c8c8c" size="24" bind:__l="__l"></uni-icons></view><view data-event-opts="{{[['tap',[['send',['$event']]]]]}}" class="send-submit send-button" bindtap="__e"><uni-icons vue-id="6e1d75c0-2" type="paperplane-filled" color="#fff" size="24" bind:__l="__l"></uni-icons></view></view></view>