Compare commits
2 Commits
b771a3c910
...
a06f0b2489
Author | SHA1 | Date | |
---|---|---|---|
a06f0b2489 | |||
84cca43b52 |
@ -2,6 +2,7 @@
|
||||
import { textReplaceEmoji } from '@/utils/emojis'
|
||||
import { textReplaceLink, textReplaceMention } from '@/utils/strings'
|
||||
import { ITalkRecordExtraText, ITalkRecord } from '@/types/chat'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
extra: ITalkRecordExtraText
|
||||
@ -12,15 +13,14 @@ const props = defineProps<{
|
||||
|
||||
const float = props.data.float
|
||||
|
||||
let textContent = props.extra?.content || ''
|
||||
|
||||
textContent = textReplaceLink(textContent)
|
||||
|
||||
if (props.data.talk_type == 2) {
|
||||
textContent = textReplaceMention(textContent, '#1890ff')
|
||||
}
|
||||
|
||||
textContent = textReplaceEmoji(textContent)
|
||||
const textContent = computed(() => {
|
||||
let text = props.extra?.content || ''
|
||||
text = textReplaceLink(text)
|
||||
if (props.data.talk_type == 2) {
|
||||
text = textReplaceMention(text, '#1890ff')
|
||||
}
|
||||
return textReplaceEmoji(text)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -194,17 +194,10 @@
|
||||
</div>
|
||||
<div class="load-toolbar pointer" style="transform: scaleY(-1);">
|
||||
<span v-if="loadConfig.status == 0">正在加载数据中 ...</span>
|
||||
<span v-else-if="loadConfig.status == 1" @click="onScrollToLower">
|
||||
<span v-if="loadConfig.status == 1" @click="onScrollToLower">
|
||||
查看更多消息 ...
|
||||
</span>
|
||||
<span
|
||||
v-else-if="
|
||||
loadConfig.status != 0 &&
|
||||
loadConfig.status != 1 &&
|
||||
state.localPageLoadDone
|
||||
"
|
||||
class="no-more"
|
||||
>
|
||||
<span v-if="loadConfig.status == 2" class="no-more">
|
||||
没有更多消息了
|
||||
</span>
|
||||
</div>
|
||||
@ -1116,6 +1109,9 @@ watch(
|
||||
) {
|
||||
//相同意味着分页加载缓存中的聊天记录完毕
|
||||
state.value.localPageLoadDone = true
|
||||
if (dialogueList?.records?.[0]?.sequence !== 1) {
|
||||
loadConfig.status = 1
|
||||
}
|
||||
} else {
|
||||
state.value.localPageLoadDone = false
|
||||
}
|
||||
@ -1227,9 +1223,9 @@ const onScrollToUpper = async () => {
|
||||
virtualList.value = tempVirtualList
|
||||
.concat(
|
||||
dialogueList.records.slice(
|
||||
Math.min(recordIndex + 11, dialogueList.records.length),
|
||||
dialogueList.records.length,
|
||||
),
|
||||
recordIndex + 1,
|
||||
Math.min(recordIndex + 11, dialogueList.records.length)
|
||||
)
|
||||
)
|
||||
.reverse()
|
||||
|
||||
@ -1522,12 +1518,11 @@ const doMentionUser = (mentionSelect) => {
|
||||
// 构造正确的 mention 对象
|
||||
const mentionObj = {
|
||||
id: mentionSelect.user_id, // 使用 user_id 而不是 erp_user_id
|
||||
nickname: mentionSelect.nickname
|
||||
nickname: mentionSelect.nickname,
|
||||
}
|
||||
getMentionSelectLists([mentionObj])
|
||||
}
|
||||
|
||||
|
||||
let avatarPressTimer = null
|
||||
let currentPressItem = null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user