Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
062034d5
Commit
062034d5
authored
Jan 09, 2026
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:常见问题被压缩&&接口调用多次
parent
f30979f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
src/pages/Chat/Chat.tsx
+6
-4
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
+1
-1
src/pages/Chat/components/ChatItem/ChatAnswerRecommend.tsx
+1
-1
No files found.
src/pages/Chat/Chat.tsx
View file @
062034d5
...
@@ -864,10 +864,12 @@ export const Chat: React.FC = () => {
...
@@ -864,10 +864,12 @@ export const Chat: React.FC = () => {
if
(
isLoading
!==
undefined
)
{
if
(
isLoading
!==
undefined
)
{
setIsLoading
(
isLoading
)
setIsLoading
(
isLoading
)
}
}
// 发送自定义事件到父组件
// 只在真正的工具切换时触发事件(有 conversationId 时),避免 loading 状态更新时重复触发
window
.
dispatchEvent
(
new
CustomEvent
(
'toolButtonClick'
,
{
if
(
conversationId
)
{
detail
:
{
isToolBtn
,
toolId
,
toolName
,
shouldChangeStyle
,
conversationId
},
window
.
dispatchEvent
(
new
CustomEvent
(
'toolButtonClick'
,
{
}))
detail
:
{
isToolBtn
,
toolId
,
toolName
,
shouldChangeStyle
,
conversationId
},
}))
}
}
}
}
}
placeholders=
{
[]
}
placeholders=
{
[]
}
/>
/>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
View file @
062034d5
...
@@ -64,7 +64,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -64,7 +64,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
/>
/>
<
div
<
div
style=
{
{
background
:
'#F7FAFD'
}
}
style=
{
{
background
:
'#F7FAFD'
}
}
className=
"rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px] relative"
className=
"rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px] relative
flex-1 min-w-0 sm:max-w-[700px] md:max-w-[900px] lg:max-w-[1200px]
"
>
>
{
item
.
answer
?.
length
||
item
.
cardList
?.
length
{
item
.
answer
?.
length
||
item
.
cardList
?.
length
?
(
?
(
...
...
src/pages/Chat/components/ChatItem/ChatAnswerRecommend.tsx
View file @
062034d5
...
@@ -90,7 +90,7 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
...
@@ -90,7 +90,7 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
}
}
},
[])
},
[])
return
(
return
(
<
div
className=
"sm:pl-[62px] mt-[12px] flex flex-col"
>
<
div
className=
"sm:pl-[62px] mt-[12px] flex flex-col
sm:max-w-[700px] md:max-w-[900px] lg:max-w-[1200px]
"
>
{
!
loading
&&
questionList
.
length
!==
0
&&
questionList
.
length
>
0
&&
(
{
!
loading
&&
questionList
.
length
!==
0
&&
questionList
.
length
>
0
&&
(
<
div
className=
"flex flex-col gap-[8px]"
>
<
div
className=
"flex flex-col gap-[8px]"
>
{
{
...
...
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