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