Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-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
王立鹏
corporate-culture-qd
Commits
e0f5e0ae
Commit
e0f5e0ae
authored
Aug 26, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 23684】ux: 优化体验
parent
bba0cdba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
index.vue
src/components/common/ArticleContent/index.vue
+20
-12
No files found.
src/components/common/ArticleContent/index.vue
View file @
e0f5e0ae
...
...
@@ -232,20 +232,27 @@
</div>
<!-- 标签 -->
<div
class=
"flex flex-wrap gap-2 mt-6"
>
<
button
<
el-tooltip
v-for=
"(item, index) in articleDetail?.tagNameList"
:key=
"item"
type=
"button
"
:content=
"canLoadRelatedColumns ? '点击查看相关推荐专栏' : ''
"
:disabled=
"!canLoadRelatedColumns"
:class=
"[
'px-3 py-1 text-sm bg-gradient-to-r from-cyan-100 to-blue-100 text-cyan-600 rounded-full transition-all',
canLoadRelatedColumns ? 'cursor-pointer hover:shadow-md' : 'cursor-default',
activeKeyword === item ? 'ring-2 ring-cyan-400' : '',
]"
@
click=
"handleTagClick(item, articleDetail.tagIdList[index]!)"
placement=
"top"
:show-after=
"200"
>
#{{ item }}
</button>
<button
type=
"button"
:disabled=
"!canLoadRelatedColumns"
:class=
"[
'px-3 py-1 text-sm bg-gradient-to-r from-cyan-100 to-blue-100 text-cyan-600 rounded-full transition-all',
canLoadRelatedColumns ? 'cursor-pointer hover:shadow-md' : 'cursor-default',
activeKeyword === item ? 'ring-2 ring-cyan-400' : '',
]"
@
click=
"handleTagClick(item, articleDetail.tagIdList[index]!)"
>
#{{ item }}
</button>
</el-tooltip>
</div>
<div
...
...
@@ -253,7 +260,7 @@
v-loading=
"relatedColumnLoading"
class=
"mt-4 min-h-24 border-t border-gray-100 pt-4"
>
<h2
class=
"mb-3 text-sm font-semibold text-gray-700"
>
相关推荐
</h2>
<h2
class=
"mb-3 text-sm font-semibold text-gray-700"
>
相关推荐
专栏
</h2>
<ul
v-if=
"relatedColumnList.length"
class=
"space-y-2"
>
<li
v-for=
"(item, index) in relatedColumnList"
:key=
"item.id"
>
<button
...
...
@@ -322,6 +329,7 @@ const loading = computed(() => !articleDetail.title)
const
canLoadRelatedColumns
=
computed
(
()
=>
articleDetail
.
type
===
ArticleTypeEnum
.
COLUMN
&&
!
isAudit
,
)
// 点击标签后只展示当前关键词下的相关推荐专栏,列表由后端按优先级排好后再截取前三条。
const
activeKeyword
=
ref
(
''
)
const
relatedColumnLoading
=
ref
(
false
)
const
relatedColumnList
=
ref
<
RelatedColumnItemDto
[]
>
([])
...
...
@@ -337,7 +345,7 @@ const handleTagClick = async (keyword: string, tagId: number) => {
articleId
:
articleDetail
.
id
,
tagId
,
})
relatedColumnList
.
value
=
data
relatedColumnList
.
value
=
data
.
slice
(
0
,
3
)
}
catch
{
relatedColumnList
.
value
=
[]
}
finally
{
...
...
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