Compare commits

..

No commits in common. "32e8428f46e1553a8f5e61ed719f3657f2fe033c" and "9e8e3aeba30866810eb387a7d2f5ea9e9c2f93a1" have entirely different histories.

View File

@ -12,13 +12,7 @@ const props = defineProps<{
const isShowRecord = ref(false)
const title = computed(() => {
const uniqueNames = [...new Set(props.extra.records.map(v => v.nickname))];
if (uniqueNames.length <= 2) {
return uniqueNames.join('和');
} else {
return uniqueNames.slice(0, 2).join('和') + '等';
}
// 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 = () => {
@ -30,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>
@ -65,14 +59,13 @@ const onClick = () => {
}
.title {
max-height: 88rpx;
height: 44rpx;
line-height: 44rpx;
font-size: 32rpx;
color: #1A1A1A;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 400;
margin-bottom: 8rpx;
}