Initial commit
This commit is contained in:
21
miniprogram/pages/chat/chat.wxml
Normal file
21
miniprogram/pages/chat/chat.wxml
Normal file
@@ -0,0 +1,21 @@
|
||||
<view class="chat-page">
|
||||
<view class="safe-top" style="height: {{statusBarHeight}}px"></view>
|
||||
<view class="chat-nav">
|
||||
<view class="nav-back" bindtap="onBack">‹</view>
|
||||
<view class="nav-title">{{peerName}}</view>
|
||||
<view class="nav-more">⋯</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="msg-scroll" scroll-into-view="{{scrollToMsg}}" enhanced="true" show-scrollbar="false">
|
||||
<view wx:for="{{messages}}" wx:key="_id" id="msg-{{item._id}}"
|
||||
class="msg-row {{item.isMe ? 'msg-right' : 'msg-left'}}">
|
||||
<view class="msg-bubble {{item.isMe ? 'bubble-me' : 'bubble-peer'}}">
|
||||
<text>{{item.content}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 160rpx;"></view>
|
||||
</scroll-view>
|
||||
<view class="input-bar">
|
||||
<input class="msg-input" value="{{inputText}}" bindinput="onInput" placeholder="发消息..." adjust-position="true" cursor-spacing="20" />
|
||||
<view class="send-btn {{inputText ? '' : 'send-disabled'}}" bindtap="onSend">发送</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user