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
8a250ce8
Commit
8a250ce8
authored
Dec 09, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:常见问题
parent
ef5ed928
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
src/pages/Home/components/QuestionList/QuestionList.tsx
+4
-1
No files found.
src/pages/Home/components/QuestionList/QuestionList.tsx
View file @
8a250ce8
...
@@ -131,6 +131,9 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({
...
@@ -131,6 +131,9 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({
updateDisplayedItems
()
updateDisplayedItems
()
},
[
updateDisplayedItems
])
},
[
updateDisplayedItems
])
// 当上游将 questions 清空时,立即清空展示项,避免短暂显示旧数据
const
itemsToRender
=
questions
.
length
===
0
?
[]
:
displayedItems
return
(
return
(
<
div
<
div
className=
"bg-white box-border px-[20px] py-[12px] w-full sm:w-[300px] md:w-[300px]"
className=
"bg-white box-border px-[20px] py-[12px] w-full sm:w-[300px] md:w-[300px]"
...
@@ -180,7 +183,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({
...
@@ -180,7 +183,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({
animate=
"visible"
animate=
"visible"
className=
"mt-[8px] flex flex-col gap-[8px] w-full"
className=
"mt-[8px] flex flex-col gap-[8px] w-full"
>
>
{
displayedItems
.
map
((
item
,
index
)
=>
(
{
itemsToRender
.
map
((
item
,
index
)
=>
(
<
motion
.
li
<
motion
.
li
key=
{
`question-${item}`
}
key=
{
`question-${item}`
}
custom=
{
index
}
custom=
{
index
}
...
...
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