Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
97b73676
Commit
97b73676
authored
Mar 01, 2019
by
zhengjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复右击刷新选项卡404的问题
parent
5d4f9903
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
src/router/index.js
+11
-0
src/views/layout/components/TagsView.vue
+11
-0
src/views/redirect/index.vue
+12
-0
No files found.
src/router/index.js
View file @
97b73676
...
@@ -36,6 +36,17 @@ export const constantRouterMap = [
...
@@ -36,6 +36,17 @@ export const constantRouterMap = [
hidden
:
true
hidden
:
true
},
},
{
{
path
:
'/redirect'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
'/redirect/:path*'
,
component
:
()
=>
import
(
'@/views/redirect/index'
)
}
]
},
{
path
:
'/'
,
path
:
'/'
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'dashboard'
,
redirect
:
'dashboard'
,
...
...
src/views/layout/components/TagsView.vue
View file @
97b73676
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
</router-link>
</router-link>
</scroll-pane>
</scroll-pane>
<ul
v-show=
"visible"
:style=
"
{left:left+'px',top:top+'px'}" class="contextmenu">
<ul
v-show=
"visible"
:style=
"
{left:left+'px',top:top+'px'}" class="contextmenu">
<li
@
click=
"refreshSelectedTag(selectedTag)"
>
刷新
</li>
<li
@
click=
"closeSelectedTag(selectedTag)"
>
关闭
</li>
<li
@
click=
"closeSelectedTag(selectedTag)"
>
关闭
</li>
<li
@
click=
"closeOthersTags"
>
关闭其他
</li>
<li
@
click=
"closeOthersTags"
>
关闭其他
</li>
<li
@
click=
"closeAllTags"
>
关闭所有
</li>
<li
@
click=
"closeAllTags"
>
关闭所有
</li>
...
@@ -85,6 +86,16 @@ export default {
...
@@ -85,6 +86,16 @@ export default {
}
}
})
})
},
},
refreshSelectedTag
(
view
)
{
this
.
$store
.
dispatch
(
'delCachedView'
,
view
).
then
(()
=>
{
const
{
fullPath
}
=
view
this
.
$nextTick
(()
=>
{
this
.
$router
.
replace
({
path
:
'/redirect'
+
fullPath
})
})
})
},
closeSelectedTag
(
view
)
{
closeSelectedTag
(
view
)
{
this
.
$store
.
dispatch
(
'delView'
,
view
).
then
(({
visitedViews
})
=>
{
this
.
$store
.
dispatch
(
'delView'
,
view
).
then
(({
visitedViews
})
=>
{
if
(
this
.
isActive
(
view
))
{
if
(
this
.
isActive
(
view
))
{
...
...
src/views/redirect/index.vue
0 → 100644
View file @
97b73676
<
script
>
export
default
{
beforeCreate
()
{
const
{
params
,
query
}
=
this
.
$route
const
{
path
}
=
params
this
.
$router
.
replace
({
path
:
'/'
+
path
,
query
})
},
render
:
function
(
h
)
{
return
h
()
// avoid warning message
}
}
</
script
>
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