Merge branch 'wwt'
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run

This commit is contained in:
wwt 2025-03-20 16:53:27 +08:00
commit 32e8428f46

View File

@ -12,7 +12,13 @@ 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('和') 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('')
}) })
console.log(props.extra.records) console.log(props.extra.records)
const onClick = () => { const onClick = () => {
@ -24,7 +30,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 }}<span v-if="props.extra.records.length > 2"></span>的会话记录</div> <div class="title">{{ title }}的会话记录</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>
@ -59,13 +65,14 @@ const onClick = () => {
} }
.title { .title {
height: 44rpx; max-height: 88rpx;
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;
} }