Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
2bb401e2
Commit
2bb401e2
authored
Apr 09, 2025
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(markdown render): 表格字体颜色修改
parent
774da38e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
message-item.vue
src/views/home/components/message-item.vue
+17
-5
No files found.
src/views/home/components/message-item.vue
View file @
2bb401e2
...
@@ -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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment