变量名重构

This commit is contained in:
bob
2025-05-18 12:28:31 +08:00
parent e3d01fc035
commit 5c0b255092
6 changed files with 10 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ export const msgContentType = {
AUDIO: 0b0000100000000000, // 音频文件
VIDEO: 0b0001000000000000, // 视频
DOCUMENT: 0b0010000000000000, // 文档
FORWARD_TOGETHER: 0b0100000000000000 // 合并转发消息
FORWARD: 0b0100000000000000 // 合并转发消息
}
// 消息发送状态

View File

@@ -51,7 +51,7 @@ export const showSimplifyMsgContent = (content) => {
case msgContentType.DOCUMENT:
simplifyContent = simplifyContent + `[文件] ${documentData.document[item.value]?.fileName}`
break
case msgContentType.FORWARD_TOGETHER:
case msgContentType.FORWARD:
simplifyContent = simplifyContent + '[聊天记录]'
break
@@ -110,7 +110,7 @@ export const isMatchMsgStruct = (contentStr) => {
}
break
}
case msgContentType.FORWARD_TOGETHER: {
case msgContentType.FORWARD: {
const { sessionId, data } = value
if (!sessionId || !data) {
return false

View File

@@ -1440,14 +1440,14 @@ const handleConfirmForwardMsg = async (sessions) => {
session: item,
content: JSON.stringify([
{
type: msgContentType.FORWARD_TOGETHER,
type: msgContentType.FORWARD,
value: {
sessionId: selectedSessionId.value,
data: [...msgs]
}
}
]),
contentType: msgContentType.FORWARD_TOGETHER
contentType: msgContentType.FORWARD
})
}
}

View File

@@ -86,7 +86,7 @@ const loadRelatedMsg = async () => {
} else {
quoteMsg.value[msg.msgId] = msgFromStore
}
} else if (item.type === msgContentType.FORWARD_TOGETHER) {
} else if (item.type === msgContentType.FORWARD) {
if (!forwardMsgs.value[msg.msgId]) {
forwardMsgs.value[msg.msgId] = []
}
@@ -162,7 +162,7 @@ const renderContent = ({ msg }) => {
return renderVideo(item.value, msgId)
case msgContentType.DOCUMENT:
return renderDocument(item.value)
case msgContentType.FORWARD_TOGETHER:
case msgContentType.FORWARD:
return renderForwardTogether(item.value, msgId)
default:
return <span></span>

View File

@@ -44,7 +44,7 @@ const menu = computed(() => {
if (
contentType.value !== msgContentType.RECORDING &&
contentType.value !== msgContentType.FORWARD_TOGETHER
contentType.value !== msgContentType.FORWARD
) {
o.push({
label: 'copy',

View File

@@ -100,7 +100,7 @@ const loadRelatedMsg = async () => {
} else {
quoteMsg.value = msg
}
} else if (item.type === msgContentType.FORWARD_TOGETHER) {
} else if (item.type === msgContentType.FORWARD) {
const forwatdMsgIds = item.value.data.map((item) => item.msgId)
const toQueryMsgIds = []
@@ -182,7 +182,7 @@ const renderComponent = (content) => {
return renderVideo(item.value)
case msgContentType.DOCUMENT:
return renderDocument(item.value)
case msgContentType.FORWARD_TOGETHER:
case msgContentType.FORWARD:
return renderForwardTogether(item.value)
default:
return h('span', content)