会话存档

This commit is contained in:
liuye
2023-06-09 09:28:05 +08:00
parent 7e40790569
commit b5afda4cce
2 changed files with 19 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ export default {
}, },
data() { data() {
return { return {
component: "List", component: "Detail",
params: {}, params: {},
include: [], include: [],
}; };

View File

@@ -56,7 +56,8 @@
<div class="content-right-info"> <div class="content-right-info">
<div v-for="(item, index) in msgList" :key="index"> <div v-for="(item, index) in msgList" :key="index">
<div class="item" :class="item.userId == id ? 'item-right' : 'item-left'"> <div class="item" :class="item.userId == id ? 'item-right' : 'item-left'">
<p class="time" v-if="index == 0">{{item.createTime}}</p> <!-- <p class="time" v-if="index == 0">{{item.msgSendTime}}</p> -->
<p class="user-name">{{item.userName}}<span>{{item.msgSendTime}}</span></p>
<div class="item-content-flex"> <div class="item-content-flex">
<!-- <i class="el-icon-warning" v-if="item.userId == id"></i> --> <!-- <i class="el-icon-warning" v-if="item.userId == id"></i> -->
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != id"> <img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != id">
@@ -135,7 +136,7 @@
{name: '文件', value: 'file'}, {name: '文件', value: 'file'},
], ],
searchMsg: '', searchMsg: '',
id: '' id: 'LiuYe'
} }
}, },
computed: { computed: {
@@ -147,6 +148,7 @@
this.id = this.params.id this.id = this.params.id
this.getList() this.getList()
} }
this.getList()
}, },
methods: { methods: {
@@ -403,11 +405,16 @@
overflow-y: scroll; overflow-y: scroll;
.item { .item {
margin-bottom: 48px; margin-bottom: 48px;
.time { .user-name {
color: #999; color: #666;
font-size: 14px; font-size: 12px;
line-height: 44px; line-height: 20px;
text-align: center; padding:0 0 0 64px;
span {
display: inline-block;
margin: 0 12px;
color: #999;
}
} }
.item-content-flex { .item-content-flex {
display: flex; display: flex;
@@ -486,6 +493,10 @@
.item-right { .item-right {
width: 100%; width: 100%;
justify-content: right; justify-content: right;
.user-name {
text-align: right;
padding: 0 52px 0 0;
}
.item-content-flex { .item-content-flex {
justify-content: end; justify-content: end;
.user-img { .user-img {