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
25b475bb
Commit
25b475bb
authored
Aug 24, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated router help
parent
94156f4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
index.js
src/components/menu/index.js
+1
-1
index.js
src/router/index.js
+5
-0
No files found.
src/components/menu/index.js
View file @
25b475bb
...
@@ -90,7 +90,7 @@ export default {
...
@@ -90,7 +90,7 @@ export default {
)
)
},
},
renderItem
:
function
(
h
,
menu
,
pIndex
,
index
)
{
renderItem
:
function
(
h
,
menu
,
pIndex
,
index
)
{
if
(
!
menu
.
invisible
)
{
if
(
!
menu
.
hidden
)
{
return
menu
.
children
?
this
.
renderSubMenu
(
h
,
menu
,
pIndex
,
index
)
:
this
.
renderMenuItem
(
h
,
menu
,
pIndex
,
index
)
return
menu
.
children
?
this
.
renderSubMenu
(
h
,
menu
,
pIndex
,
index
)
:
this
.
renderMenuItem
(
h
,
menu
,
pIndex
,
index
)
}
}
},
},
...
...
src/router/index.js
View file @
25b475bb
...
@@ -5,6 +5,9 @@ import LayoutBase from '../components/layout/LayoutBaseView'
...
@@ -5,6 +5,9 @@ import LayoutBase from '../components/layout/LayoutBaseView'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
/**
/**
* 路由配置说明:
* 建议:sider menu 请不要超过三级菜单,若超过三级菜单,则应该设计为顶部主菜单 配合左侧次级菜单
*
* hidden: true if `hidden:true` will not show in the sidebar(default is false)
* hidden: true if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu, whatever its child routes length
* alwaysShow: true if set true, will always show the root menu, whatever its child routes length
* if not set alwaysShow, only more than one route under the children
* if not set alwaysShow, only more than one route under the children
...
@@ -14,6 +17,7 @@ Vue.use(Router)
...
@@ -14,6 +17,7 @@ Vue.use(Router)
* meta : {
* meta : {
title: 'title' the name show in submenu and breadcrumb (recommend set)
title: 'title' the name show in submenu and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar,
icon: 'svg-name' the icon show in the sidebar,
keepAlive: true keep alive component
hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details)
hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details)
}
}
**/
**/
...
@@ -60,6 +64,7 @@ export const asyncRouterMap = [
...
@@ -60,6 +64,7 @@ export const asyncRouterMap = [
{
{
path
:
'/dashboard/monitor'
,
path
:
'/dashboard/monitor'
,
name
:
'Monitor'
,
name
:
'Monitor'
,
hidden
:
true
,
component
:
()
=>
import
(
'../views/dashboard/Monitor'
),
component
:
()
=>
import
(
'../views/dashboard/Monitor'
),
meta
:
{
title
:
'监控页'
,
hideHeader
:
true
}
meta
:
{
title
:
'监控页'
,
hideHeader
:
true
}
},
},
...
...
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