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
5ba0ac6a
Commit
5ba0ac6a
authored
Nov 13, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 feat: 加入全局变量等
parent
2c42431e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
index.ts
src/stores/index.ts
+2
-0
tags.ts
src/stores/tags.ts
+15
-5
No files found.
src/stores/index.ts
0 → 100644
View file @
5ba0ac6a
export
*
from
'./user'
export
*
from
'./tags'
src/stores/tags.ts
View file @
5ba0ac6a
...
@@ -8,12 +8,22 @@ import { getTagList } from '@/api'
...
@@ -8,12 +8,22 @@ import { getTagList } from '@/api'
export
const
useTagsStore
=
defineStore
(
'tags'
,
()
=>
{
export
const
useTagsStore
=
defineStore
(
'tags'
,
()
=>
{
const
tagList
=
ref
<
{
label
:
string
;
value
:
number
}[]
>
([])
const
tagList
=
ref
<
{
label
:
string
;
value
:
number
}[]
>
([])
let
isLoading
=
false
const
fetchTagList
=
async
()
=>
{
const
fetchTagList
=
async
()
=>
{
const
{
data
}
=
await
getTagList
()
if
(
isLoading
)
return
tagList
.
value
=
data
.
map
((
item
)
=>
({
isLoading
=
true
label
:
item
.
title
,
try
{
value
:
item
.
id
,
const
{
data
}
=
await
getTagList
()
}))
tagList
.
value
=
data
.
map
((
item
)
=>
({
label
:
item
.
title
,
value
:
item
.
id
,
}))
}
catch
(
error
)
{
console
.
error
(
error
)
}
finally
{
isLoading
=
false
}
}
}
return
{
tagList
,
fetchTagList
}
return
{
tagList
,
fetchTagList
}
...
...
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