Commit 2bb401e2 authored by tyyin lan's avatar tyyin lan

chore(markdown render): 表格字体颜色修改

parent 774da38e
...@@ -34,10 +34,14 @@ const avatarUrl = computed(() => { ...@@ -34,10 +34,14 @@ const avatarUrl = computed(() => {
return isAgentMessage.value ? props.messageItem.avatar || agentDefaultAvatarUrl.url : userStore.userInfo.avatarUrl return isAgentMessage.value ? props.messageItem.avatar || agentDefaultAvatarUrl.url : userStore.userInfo.avatarUrl
}) })
const name = computed(() => { const messageAuthor = computed(() => {
return isAgentMessage.value ? props.messageItem.name || 'AI助理' : userStore.userInfo.nickName return isAgentMessage.value ? props.messageItem.name || 'AI助理' : userStore.userInfo.nickName
}) })
const currentBubbleTextColor = computed(() => {
return isAgentMessage.value ? '#fff' : '#192338'
})
function handleShowReasoningContentSwitch() { function handleShowReasoningContentSwitch() {
isShowReasoningContent.value = !isShowReasoningContent.value isShowReasoningContent.value = !isShowReasoningContent.value
} }
...@@ -74,7 +78,7 @@ const handleContentEdit = throttle( ...@@ -74,7 +78,7 @@ const handleContentEdit = throttle(
<template v-if="isAgentMessage && messageItem.name === 'Deepseek R1'"> <template v-if="isAgentMessage && messageItem.name === 'Deepseek R1'">
<div class="mb-[7px] select-none text-[14px]"> <div class="mb-[7px] select-none text-[14px]">
<div class="inline-flex cursor-pointer" @click="handleShowReasoningContentSwitch"> <div class="inline-flex cursor-pointer" @click="handleShowReasoningContentSwitch">
<span class="mr-[6px]">{{ name }}</span> <span class="mr-[6px]">{{ messageAuthor }}</span>
<Down <Down
theme="outline" theme="outline"
size="21" size="21"
...@@ -110,7 +114,7 @@ const handleContentEdit = throttle( ...@@ -110,7 +114,7 @@ const handleContentEdit = throttle(
</n-collapse-transition> </n-collapse-transition>
</template> </template>
<div v-else class="mb-[7px] text-[12px] text-[#999]"> <div v-else class="mb-[7px] text-[12px] text-[#999]">
{{ name }} {{ messageAuthor }}
</div> </div>
<div <div
...@@ -130,7 +134,7 @@ const handleContentEdit = throttle( ...@@ -130,7 +134,7 @@ const handleContentEdit = throttle(
v-if="messageItem.isAnswerLoading && !messageItem.content" v-if="messageItem.isAnswerLoading && !messageItem.content"
class="flex h-[21px] items-center justify-center" class="flex h-[21px] items-center justify-center"
> >
<MessageBubbleLoading :active-color="isAgentMessage ? '#fff' : '#192338'" /> <MessageBubbleLoading :active-color="currentBubbleTextColor" />
</div> </div>
<template v-else> <template v-else>
<MarkdownRender <MarkdownRender
...@@ -138,7 +142,7 @@ const handleContentEdit = throttle( ...@@ -138,7 +142,7 @@ const handleContentEdit = throttle(
:raw-text-content=" :raw-text-content="
messageItem.content ? messageItem.content : t('common_module.dialogue_module.empty_message_content') messageItem.content ? messageItem.content : t('common_module.dialogue_module.empty_message_content')
" "
:color="isAgentMessage ? '#fff' : '#192338'" :color="currentBubbleTextColor"
/> />
<div v-if="messageItem.isAnswerLoading" class="ml-[15px] pt-[12px]"> <div v-if="messageItem.isAnswerLoading" class="ml-[15px] pt-[12px]">
...@@ -183,3 +187,11 @@ const handleContentEdit = throttle( ...@@ -183,3 +187,11 @@ const handleContentEdit = throttle(
</div> </div>
</div> </div>
</template> </template>
<style lang="scss" scoped>
:deep(.markdown-render-container .markdown-render-inner) {
table {
color: #192338 !important;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment