|
|
@ -1,17 +1,18 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="chat-msg-item"> |
|
|
<view class="chat-msg-item"> |
|
|
<view class="chat-msg-tip" v-show="msgInfo.type==$enums.MESSAGE_TYPE.RECALL">{{msgInfo.content}}</view> |
|
|
<view class="chat-msg-tip" v-show="msgInfo.type==$enums.MESSAGE_TYPE.RECALL">{{msgInfo.content}}</view> |
|
|
|
|
|
<view class="chat-msg-tip" v-show="msgInfo.type==$enums.MESSAGE_TYPE.TIP_TIME"> |
|
|
<view class="chat-msg-normal" v-show="msgInfo.type!=$enums.MESSAGE_TYPE.RECALL" |
|
|
{{$date.toTimeText(msgInfo.sendTime)}}</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="chat-msg-normal" v-show="msgInfo.type>=0 && msgInfo.type<10" |
|
|
:class="{'chat-msg-mine':msgInfo.selfSend}"> |
|
|
:class="{'chat-msg-mine':msgInfo.selfSend}"> |
|
|
<view class="avatar" @click="onShowUserInfo(msgInfo.sendId)"> |
|
|
<view class="avatar" @click="onShowUserInfo(msgInfo.sendId)"> |
|
|
<image class="head-image" :src="headImage" lazy-load="true"></image> |
|
|
<image class="head-image" :src="headImage" lazy-load="true"></image> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="chat-msg-content" @longpress="onShowMenu($event)"> |
|
|
<view class="chat-msg-content" @longpress="onShowMenu($event)"> |
|
|
<view class="chat-msg-top"> |
|
|
<view v-show="msgInfo.groupId && !msgInfo.selfSend" class="chat-msg-top"> |
|
|
<text>{{showName}}</text> |
|
|
<text>{{showName}}</text> |
|
|
<text>{{$date.toTimeText(msgInfo.sendTime)}}</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="chat-msg-bottom"> |
|
|
<view class="chat-msg-bottom"> |
|
|
@ -189,7 +190,7 @@ |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.chat-msg-item { |
|
|
.chat-msg-item { |
|
|
padding: 20rpx; |
|
|
padding: 2rpx 20rpx; |
|
|
|
|
|
|
|
|
.chat-msg-tip { |
|
|
.chat-msg-tip { |
|
|
line-height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
@ -200,16 +201,16 @@ |
|
|
position: relative; |
|
|
position: relative; |
|
|
font-size: 0; |
|
|
font-size: 0; |
|
|
margin-bottom: 15rpx; |
|
|
margin-bottom: 15rpx; |
|
|
padding-left: 120rpx; |
|
|
padding-left: 100rpx; |
|
|
min-height: 120rpx; |
|
|
min-height: 80rpx; |
|
|
|
|
|
|
|
|
.avatar { |
|
|
.avatar { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
width: 100rpx; |
|
|
width: 70rpx; |
|
|
height: 100rpx; |
|
|
height: 70rpx; |
|
|
top: 0; |
|
|
top: 0; |
|
|
left: 0; |
|
|
left: 0; |
|
|
|
|
|
|
|
|
@ -229,42 +230,39 @@ |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-wrap: nowrap; |
|
|
flex-wrap: nowrap; |
|
|
color: #333; |
|
|
color: #333; |
|
|
font-size: 14px; |
|
|
font-size: 24rpx; |
|
|
line-height: 20px; |
|
|
line-height: 24rpx; |
|
|
|
|
|
|
|
|
text { |
|
|
|
|
|
margin-right: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.chat-msg-bottom { |
|
|
.chat-msg-bottom { |
|
|
display: inline-block; |
|
|
display: inline-block; |
|
|
padding-right: 120rpx ; |
|
|
padding-right: 80rpx ; |
|
|
.chat-msg-text { |
|
|
.chat-msg-text { |
|
|
position: relative; |
|
|
position: relative; |
|
|
line-height: 30px; |
|
|
line-height: 60rpx; |
|
|
margin-top: 10px; |
|
|
margin-top: 10rpx; |
|
|
padding: 10px; |
|
|
padding: 10rpx; |
|
|
background-color: rgb(235,235,245); |
|
|
background-color: rgb(235,235,245); |
|
|
border-radius: 3px; |
|
|
border-radius: 10rpx; |
|
|
color: #333; |
|
|
color: #333; |
|
|
font-size: 16px; |
|
|
font-size: 30rpx; |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
display: block; |
|
|
display: block; |
|
|
word-break: break-all; |
|
|
word-break: break-all; |
|
|
white-space: pre-line; |
|
|
white-space: pre-line; |
|
|
|
|
|
box-shadow: 2px 2px 2px #c0c0f0; |
|
|
&:after { |
|
|
&:after { |
|
|
content: ""; |
|
|
content: ""; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
left: -10px; |
|
|
left: -20rpx; |
|
|
top: 13px; |
|
|
top: 26rpx; |
|
|
width: 0; |
|
|
width: 0; |
|
|
height: 0; |
|
|
height: 0; |
|
|
border-style: solid dashed dashed; |
|
|
border-style: solid dashed dashed; |
|
|
border-color: rgb(235,235,245) transparent transparent; |
|
|
border-color: rgb(235,235,245) transparent transparent; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
border-width: 10px; |
|
|
border-width: 20rpx; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -284,6 +282,7 @@ |
|
|
max-width: 400rpx; |
|
|
max-width: 400rpx; |
|
|
max-height: 300rpx; |
|
|
max-height: 300rpx; |
|
|
border: #dddddd solid 1px; |
|
|
border: #dddddd solid 1px; |
|
|
|
|
|
box-shadow: 2px 2px 2px #c0c0c0; |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -309,19 +308,19 @@ |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-wrap: nowrap; |
|
|
flex-wrap: nowrap; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
width: 65%; |
|
|
|
|
|
min-height: 80px; |
|
|
min-height: 80px; |
|
|
border: #dddddd solid 1px; |
|
|
border: #dddddd solid 1px; |
|
|
border-radius: 3px; |
|
|
border-radius: 10rpx; |
|
|
background-color: #eeeeee; |
|
|
background-color: #eeeeee; |
|
|
padding: 10px 15px; |
|
|
padding: 10px 15px; |
|
|
|
|
|
box-shadow: 2px 2px 2px #c0c0c0; |
|
|
.chat-file-info { |
|
|
.chat-file-info { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
font-size: 14px; |
|
|
font-size: 14px; |
|
|
|
|
|
width: 300rpx; |
|
|
|
|
|
|
|
|
.chat-file-name { |
|
|
.chat-file-name { |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
@ -361,7 +360,7 @@ |
|
|
&.chat-msg-mine { |
|
|
&.chat-msg-mine { |
|
|
text-align: right; |
|
|
text-align: right; |
|
|
padding-left: 0; |
|
|
padding-left: 0; |
|
|
padding-right: 120rpx; |
|
|
padding-right: 100rpx; |
|
|
|
|
|
|
|
|
.avatar { |
|
|
.avatar { |
|
|
left: auto; |
|
|
left: auto; |
|
|
@ -370,23 +369,15 @@ |
|
|
|
|
|
|
|
|
.chat-msg-content { |
|
|
.chat-msg-content { |
|
|
text-align: right; |
|
|
text-align: right; |
|
|
.chat-msg-top { |
|
|
|
|
|
flex-direction: row-reverse; |
|
|
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
|
margin-left: 12px; |
|
|
|
|
|
margin-right: 0; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chat-msg-bottom { |
|
|
.chat-msg-bottom { |
|
|
padding-left: 120rpx ; |
|
|
padding-left: 80rpx ; |
|
|
padding-right: 0; |
|
|
padding-right: 0; |
|
|
.chat-msg-text { |
|
|
.chat-msg-text { |
|
|
margin-left: 10px; |
|
|
margin-left: 10px; |
|
|
background-color: rgb(88, 127, 240); |
|
|
background-color: rgb(88, 127, 240); |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
|
|
|
box-shadow: 2px 2px 1px #ccc; |
|
|
&:after { |
|
|
&:after { |
|
|
left: auto; |
|
|
left: auto; |
|
|
right: -10px; |
|
|
right: -10px; |
|
|
|