Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
ac11d887
Commit
ac11d887
authored
Sep 22, 2022
by
dcy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭左侧Tab报错页面报错 bug修复
parent
782511e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
tagsView.js
src/store/modules/tagsView.js
+26
-0
No files found.
src/store/modules/tagsView.js
View file @
ac11d887
...
@@ -82,6 +82,26 @@ const mutations = {
...
@@ -82,6 +82,26 @@ const mutations = {
}
}
return
false
return
false
})
})
},
DEL_LEFT_VIEWS
:
(
state
,
view
)
=>
{
const
index
=
state
.
visitedViews
.
findIndex
(
v
=>
v
.
path
===
view
.
path
)
if
(
index
===
-
1
)
{
return
}
state
.
visitedViews
=
state
.
visitedViews
.
filter
((
item
,
idx
)
=>
{
if
(
idx
>=
index
||
(
item
.
meta
&&
item
.
meta
.
affix
))
{
return
true
}
const
i
=
state
.
cachedViews
.
indexOf
(
item
.
name
)
if
(
i
>
-
1
)
{
state
.
cachedViews
.
splice
(
i
,
1
)
}
if
(
item
.
meta
.
link
)
{
const
fi
=
state
.
iframeViews
.
findIndex
(
v
=>
v
.
path
===
item
.
path
)
state
.
iframeViews
.
splice
(
fi
,
1
)
}
return
false
})
}
}
}
}
...
@@ -176,6 +196,12 @@ const actions = {
...
@@ -176,6 +196,12 @@ const actions = {
resolve
([...
state
.
visitedViews
])
resolve
([...
state
.
visitedViews
])
})
})
},
},
delLeftTags
({
commit
},
view
){
return
new
Promise
(
resolve
=>
{
commit
(
'
DEL_LEFT_VIEWS
'
,
view
)
resolve
([...
state
.
visitedViews
])
})
},
delCurrentView
({
dispatch
}){
delCurrentView
({
dispatch
}){
const
view
=
router
.
history
.
current
const
view
=
router
.
history
.
current
return
dispatch
(
'
delView
'
,
view
).
then
(({
visitedViews
})
=>
{
return
dispatch
(
'
delView
'
,
view
).
then
(({
visitedViews
})
=>
{
...
...
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