Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
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
tianzhuanghu
ant-design-pro-vue
Commits
6a553ec3
Unverified
Commit
6a553ec3
authored
Mar 22, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: menu render target path
parent
fec00eb1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
menu.js
src/components/Menu/menu.js
+5
-6
router.config.js
src/config/router.config.js
+3
-4
No files found.
src/components/Menu/menu.js
View file @
6a553ec3
...
...
@@ -101,16 +101,15 @@ export default {
},
renderMenuItem
(
menu
)
{
const
target
=
menu
.
meta
.
target
||
null
const
props
=
{
to
:
{
name
:
menu
.
name
},
target
:
target
}
const
tag
=
target
&&
'a'
||
'router-link'
const
props
=
{
to
:
{
name
:
menu
.
name
}
}
const
attrs
=
{
href
:
menu
.
path
,
target
:
menu
.
meta
.
target
}
return
(
<
Item
{...{
key
:
menu
.
path
}}
>
<
router
-
link
{...{
prop
s
}}
>
<
tag
{...{
props
,
attr
s
}}
>
{
this
.
renderIcon
(
menu
.
meta
.
icon
)}
<
span
>
{
menu
.
meta
.
title
}
<
/span
>
<
/
router-link
>
<
/
tag
>
<
/Item
>
)
},
...
...
src/config/router.config.js
View file @
6a553ec3
...
...
@@ -25,12 +25,11 @@ export const asyncRouterMap = [
component
:
()
=>
import
(
'@/views/dashboard/Analysis'
),
meta
:
{
title
:
'分析页'
,
keepAlive
:
false
,
permission
:
[
'dashboard'
]
}
},
// 外部链接
{
path
:
'
/dashboard/monitor
'
,
path
:
'
https://www.baidu.com/
'
,
name
:
'Monitor'
,
hidden
:
true
,
component
:
()
=>
import
(
'@/views/dashboard/Monitor'
),
meta
:
{
title
:
'监控页'
,
keepAlive
:
true
,
permission
:
[
'dashboard'
]
}
meta
:
{
title
:
'监控页'
,
target
:
'_blank'
}
},
{
path
:
'/dashboard/workplace'
,
...
...
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