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