Compare commits
3 Commits
0e640c7ad6
...
ad2b7d42e3
Author | SHA1 | Date | |
---|---|---|---|
|
ad2b7d42e3 | ||
|
16300b68bf | ||
|
4b24e7a269 |
@ -12,9 +12,9 @@ const props = defineProps<{
|
||||
const isShowRecord = ref(false)
|
||||
|
||||
const title = computed(() => {
|
||||
return [...new Set(props.extra.records.map((v) => v.nickname))].join('、')
|
||||
return [...new Set(props.extra.records.map((v) => v.nickname))].join('和')
|
||||
})
|
||||
|
||||
console.log(props.extra.records)
|
||||
const onClick = () => {
|
||||
// isShowRecord.value = true
|
||||
uni.navigateTo({
|
||||
@ -24,7 +24,7 @@ const onClick = () => {
|
||||
</script>
|
||||
<template>
|
||||
<section class="im-message-forward pointer" :class="{ left: data.float === 'left' }" @click="onClick">
|
||||
<div class="title">{{ title }} 的会话记录</div>
|
||||
<div class="title">{{ title }}<span v-if="props.extra.records.length > 2">等</span>的会话记录</div>
|
||||
<div class="list" v-for="(record, index) in extra.records" :key="index">
|
||||
<p>
|
||||
<span>{{ record.nickname }}: </span>
|
||||
|
@ -34,7 +34,7 @@ defineProps({
|
||||
<span v-if="login_uid == user_id"> 你撤回了一条消息 | {{ formatTime(datetime) }}
|
||||
<slot></slot> <!-- 添加插槽用于放置重新编辑按钮 -->
|
||||
</span>
|
||||
<span v-else-if="talk_type == 1"> 对方撤回了一条消息 | {{ formatTime(datetime) }} </span>
|
||||
<span v-else-if="talk_type == 1">"{{ nickname }}" 撤回了一条消息 | {{ formatTime(datetime) }} </span>
|
||||
<span v-else>
|
||||
"{{ nickname }}" 撤回了一条消息 |
|
||||
{{ formatTime(datetime) }}
|
||||
|
@ -24,8 +24,13 @@ const onLoadData = () => {
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
items.value = res.data.items || []
|
||||
|
||||
title.value = [...new Set(items.value.map((v) => v.nickname))].join('、')
|
||||
// 修复标题逻辑
|
||||
const uniqueNames = [...new Set(items.value.map(v => v.nickname))];
|
||||
if (uniqueNames.length <= 2) {
|
||||
title.value = uniqueNames.join('和');
|
||||
} else {
|
||||
title.value = uniqueNames.slice(0, 2).join('和') + '等';
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -7,8 +7,10 @@
|
||||
>
|
||||
<div class="avatarImg">
|
||||
<tm-badge
|
||||
:count="props.data.unread_num"
|
||||
:count="props.data.is_disturb === 1 ? props.data.unread_num : ''"
|
||||
:dot="props.data.is_disturb === 0 && props.data.unread_num"
|
||||
:maxCount="99"
|
||||
class="badge"
|
||||
color="#D03050"
|
||||
>
|
||||
<avatarModule
|
||||
@ -154,6 +156,10 @@ const handleDelete = () => {
|
||||
// border: 1px solid #fff;
|
||||
// transform: translate3d(1px, 0px, 0px) !important;
|
||||
}
|
||||
::v-deep .badge .round-6{
|
||||
min-width: 22rpx;
|
||||
min-height: 22rpx;
|
||||
}
|
||||
.chatItem {
|
||||
width: 100%;
|
||||
height: 154rpx;
|
||||
|
Loading…
Reference in New Issue
Block a user