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
03141b5e
Commit
03141b5e
authored
Feb 06, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 20331】 chore: 增加标签类型
parent
3f98e5d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
tags.ts
src/stores/tags.ts
+7
-1
No files found.
src/stores/tags.ts
View file @
03141b5e
...
...
@@ -10,6 +10,10 @@ export const useTagsStore = defineStore('tags', () => {
// 关联场景相关的标签
const
relatedScenariosTagList
=
ref
<
TagItemDto
[]
>
([])
// 年度主推关键词标签
const
yearRecommendTagList
=
ref
<
TagItemDto
[]
>
([])
let
isLoading
=
false
const
fetchAllTagList
=
async
()
=>
{
...
...
@@ -17,8 +21,10 @@ export const useTagsStore = defineStore('tags', () => {
isLoading
=
true
try
{
const
{
data
}
=
await
getTagList
()
console
.
log
(
data
,
'data'
)
tagList
.
value
=
data
.
filter
((
i
)
=>
i
.
type
===
'culture'
)
relatedScenariosTagList
.
value
=
data
.
filter
((
i
)
=>
i
.
type
===
'related_scenarios'
)
yearRecommendTagList
.
value
=
data
.
filter
((
i
)
=>
i
.
type
===
'year_recommend'
)
console
.
log
(
tagList
.
value
,
'tagList'
)
}
catch
(
error
)
{
console
.
error
(
error
)
...
...
@@ -29,5 +35,5 @@ export const useTagsStore = defineStore('tags', () => {
// 手动调用一次
fetchAllTagList
()
return
{
tagList
,
fetchAllTagList
,
relatedScenariosTagList
}
return
{
tagList
,
fetchAllTagList
,
relatedScenariosTagList
,
yearRecommendTagList
}
})
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