Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
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
Administrator
web-monitor
Commits
3a3cfcc6
Commit
3a3cfcc6
authored
Sep 15, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine : router/index.js
parent
635a43ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
index.js
src/router/index.js
+6
-19
No files found.
src/router/index.js
View file @
3a3cfcc6
...
...
@@ -6,19 +6,6 @@ const _import = require('./_import_' + process.env.NODE_ENV)
/* layout */
import
Layout
from
'../views/layout/Layout'
/* login */
const
Login
=
_import
(
'login/index'
)
/* dashboard */
const
dashboard
=
_import
(
'dashboard/index'
)
/* error page */
const
Err404
=
_import
(
'404'
)
/* demo page */
const
Form
=
_import
(
'page/form'
)
const
Table
=
_import
(
'table/index'
)
Vue
.
use
(
Router
)
/**
...
...
@@ -29,15 +16,15 @@ Vue.use(Router)
* meta : `{ role: ['admin'] }` will control the page role
**/
export
const
constantRouterMap
=
[
{
path
:
'/login'
,
component
:
Login
,
hidden
:
true
},
{
path
:
'/404'
,
component
:
Err404
,
hidden
:
true
},
{
path
:
'/login'
,
component
:
_import
(
'login/index'
)
,
hidden
:
true
},
{
path
:
'/404'
,
component
:
_import
(
'404'
)
,
hidden
:
true
},
{
path
:
'/'
,
component
:
Layout
,
redirect
:
'/dashboard'
,
name
:
'
Home
'
,
name
:
'
Dashboard
'
,
hidden
:
true
,
children
:
[{
path
:
'dashboard'
,
component
:
dashboard
}]
children
:
[{
path
:
'dashboard'
,
component
:
_import
(
'dashboard/index'
)
}]
}
]
...
...
@@ -55,7 +42,7 @@ export const asyncRouterMap = [
name
:
'Example'
,
icon
:
'zujian'
,
children
:
[
{
path
:
'index'
,
component
:
Form
,
name
:
'Form'
,
icon
:
'zonghe'
}
{
path
:
'index'
,
name
:
'Form'
,
icon
:
'zonghe'
,
component
:
_import
(
'page/form'
)
}
]
},
...
...
@@ -65,7 +52,7 @@ export const asyncRouterMap = [
redirect
:
'/table/index'
,
icon
:
'tubiao'
,
noDropdown
:
true
,
children
:
[{
path
:
'index'
,
component
:
Table
,
name
:
'Table'
,
meta
:
{
role
:
[
'admin'
]
}}]
children
:
[{
path
:
'index'
,
name
:
'Table'
,
component
:
_import
(
'table/index'
)
,
meta
:
{
role
:
[
'admin'
]
}}]
},
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
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