Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
胡宝山
template_vue
Commits
b798852a
Commit
b798852a
authored
Dec 18, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭标签页清除
parent
ef5ddcd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
index.vue
src/layout/components/TagsView/index.vue
+5
-3
searchSave.js
src/store/modules/searchSave.js
+6
-2
No files found.
src/layout/components/TagsView/index.vue
View file @
b798852a
...
...
@@ -150,13 +150,15 @@ export default {
})
},
closeSelectedTag
(
view
)
{
// 关闭标签页清除存储的筛选条件数据
this
.
$store
.
dispatch
(
'searchSave/clearOneParams'
,
this
.
$route
.
path
)
this
.
$store
.
dispatch
(
'tagsView/delView'
,
view
).
then
(({
visitedViews
})
=>
{
if
(
this
.
isActive
(
view
))
{
this
.
toLastView
(
visitedViews
,
view
)
}
if
(
view
.
path
===
'/processManagement/deviceReuse'
)
{
if
(
sessionStorage
.
getItem
(
'recycleform'
)
!==
null
)
{
sessionStorage
.
removeItem
(
'recycleform'
)
}
}
//
if (view.path === '/processManagement/deviceReuse') {
//
if (sessionStorage.getItem('recycleform') !== null) { sessionStorage.removeItem('recycleform') }
//
}
})
},
closeOthersTags
()
{
...
...
src/store/modules/searchSave.js
View file @
b798852a
...
...
@@ -18,7 +18,8 @@ const mutations = {
state
.
searchParams
=
{}
},
CLEAR_ONE_PARAMS
:
(
state
,
path
)
=>
{
path
&&
state
.
searchParams
[
path
]
&&
delete
state
.
searchParams
[
path
]
// path && state.searchParams[path] && delete state.searchParams[path]
state
.
searchParams
[
path
]
=
''
}
}
...
...
@@ -32,7 +33,10 @@ const actions = {
commit
(
'RSET_SEARCH_PARAMS'
)
},
clearOneParams
({
commit
},
path
)
{
commit
(
'CLEAR_ONE_PARAMS'
,
path
)
// 延时清除缓存数据,防止路由离开前重新赋值
setTimeout
(()
=>
{
commit
(
'CLEAR_ONE_PARAMS'
,
path
)
},
2000
)
}
}
...
...
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