fix bug#3888
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
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:
parent
16300b68bf
commit
ad2b7d42e3
@ -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>
|
||||||
|
@ -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('和') + '等';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user