Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporateCulture-qd
Commits
1c5d6821
Commit
1c5d6821
authored
Dec 05, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 perf: 保持页面数据的一致
parent
7ba4f1e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
index.vue
src/views/homePage/askTab/index.vue
+12
-6
No files found.
src/views/homePage/askTab/index.vue
View file @
1c5d6821
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
<el-button
<el-button
text
text
class=
"flex items-center gap-2 text-gray-500 transition-colors"
class=
"flex items-center gap-2 text-gray-500 transition-colors"
@
click=
"handleComment(i
ndex
)"
@
click=
"handleComment(i
tem
)"
>
>
<el-icon><ChatDotRound
/></el-icon>
<el-icon><ChatDotRound
/></el-icon>
<span
class=
"text-sm"
>
{{
item
.
replyCount
||
0
}}
</span>
<span
class=
"text-sm"
>
{{
item
.
replyCount
||
0
}}
</span>
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
:id=
"item.id"
:id=
"item.id"
:total=
"item.replyCount"
:total=
"item.replyCount"
:defaultSize=
"5"
:defaultSize=
"5"
@
commentSuccess=
"() => handleCommentSuccess(i
ndex
)"
@
commentSuccess=
"() => handleCommentSuccess(i
tem
)"
/>
/>
</Transition>
</Transition>
</el-card>
</el-card>
...
@@ -252,12 +252,18 @@ const handleCollect = async (item: ArticleItemDto) => {
...
@@ -252,12 +252,18 @@ const handleCollect = async (item: ArticleItemDto) => {
ElMessage
.
success
(
item
.
hasCollect
?
'收藏成功'
:
'取消收藏'
)
ElMessage
.
success
(
item
.
hasCollect
?
'收藏成功'
:
'取消收藏'
)
}
}
const
handleComment
=
(
i
ndex
:
number
)
=>
{
const
handleComment
=
(
i
tem
:
ArticleItemDto
)
=>
{
list
.
value
[
index
]
!
.
showComment
=
!
list
.
value
[
index
]
!
.
showComment
item
.
showComment
=
!
item
.
showComment
}
}
const
handleCommentSuccess
=
(
index
:
number
)
=>
{
const
handleCommentSuccess
=
(
item
:
ArticleItemDto
)
=>
{
list
.
value
[
index
]
!
.
replyCount
++
item
.
replyCount
++
// 同时更新下
// 如果已经添加了回答 则改为未添加 并且更新问题数量
if
(
item
.
hasAddQuestion
)
{
item
.
hasAddQuestion
=
false
fetchUserQestionNum
()
}
}
}
const
handleAddQuestion
=
async
(
item
:
ArticleItemDto
)
=>
{
const
handleAddQuestion
=
async
(
item
:
ArticleItemDto
)
=>
{
...
...
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