Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
yn-science-front
Project
Project
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
徐俊
yn-science-front
Commits
fa766179
Commit
fa766179
authored
Aug 21, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
333
parent
2399077f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app.js
src/store/modules/app.js
+3
-3
No files found.
src/store/modules/app.js
View file @
fa766179
...
@@ -19,7 +19,7 @@ const mutations = {
...
@@ -19,7 +19,7 @@ const mutations = {
state
.
tabsArray
=
payload
state
.
tabsArray
=
payload
if
(
!!
state
.
tabsArray
&&
state
.
tabsArray
.
length
>
0
)
{
if
(
!!
state
.
tabsArray
&&
state
.
tabsArray
.
length
>
0
)
{
if
(
state
.
tabsArray
[
0
].
key
!=
'0'
)
{
if
(
state
.
tabsArray
[
0
].
key
!=
'0'
)
{
state
.
tabsArray
.
unshift
(
{
title
:
'首页'
,
key
:
'0'
,
code
:
'home'
,
keepAlive
:
1
,
router
:
'/home'
,
closable
:
false
}
)
state
.
tabsArray
.
unshift
(
defaultTabsList
[
2
]
)
}
}
}
}
},
},
...
@@ -118,7 +118,7 @@ const mutations = {
...
@@ -118,7 +118,7 @@ const mutations = {
router
.
push
(
list
[
index
-
1
].
router
)
router
.
push
(
list
[
index
-
1
].
router
)
}
}
else
if
(
payload
.
type
==
2
)
{
else
if
(
payload
.
type
==
2
)
{
this
.
commit
(
'app/setTabsArray'
,
[
list
[
0
]
])
this
.
commit
(
'app/setTabsArray'
,
[
obj
])
this
.
commit
(
'app/setCachedViews'
,
[
'home'
,
obj
.
code
])
this
.
commit
(
'app/setCachedViews'
,
[
'home'
,
obj
.
code
])
}
}
else
{
else
{
...
@@ -138,7 +138,7 @@ const mutations = {
...
@@ -138,7 +138,7 @@ const mutations = {
initStore
(
state
,
payload
)
{
initStore
(
state
,
payload
)
{
this
.
commit
(
'app/setOpenKeys'
,
payload
)
this
.
commit
(
'app/setOpenKeys'
,
payload
)
this
.
commit
(
'app/setActiveKeys'
,
[])
this
.
commit
(
'app/setActiveKeys'
,
[])
this
.
commit
(
'app/setTabsArray'
,
[
{
title
:
'首页'
,
key
:
'0'
,
code
:
'home'
,
keepAlive
:
1
,
router
:
'/home'
,
closable
:
false
}
])
this
.
commit
(
'app/setTabsArray'
,
[
defaultTabsList
[
2
]
])
this
.
commit
(
'app/setTabsActive'
,
'0'
)
this
.
commit
(
'app/setTabsActive'
,
'0'
)
},
},
clearStore
(
state
)
{
clearStore
(
state
)
{
...
...
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