Compare commits
No commits in common. "d13ae033551bc857725287e1d9cba72d6259d61d" and "ce9f977efdd88dd9e464bde5881c2576877c8ccc" have entirely different histories.
d13ae03355
...
ce9f977efd
@ -12,13 +12,7 @@ const props = defineProps<{
|
|||||||
const isShowRecord = ref(false)
|
const isShowRecord = ref(false)
|
||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
const uniqueNames = [...new Set(props.extra.records.map(v => v.nickname))];
|
return [...new Set(props.extra.records.map((v) => v.nickname))].join('和')
|
||||||
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('和')
|
|
||||||
})
|
})
|
||||||
console.log(props.extra.records)
|
console.log(props.extra.records)
|
||||||
const onClick = () => {
|
const onClick = () => {
|
||||||
@ -30,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>
|
||||||
@ -65,14 +59,13 @@ const onClick = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
max-height: 88rpx;
|
height: 44rpx;
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user