Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
InJoyU
vue-element-admin
提交
69fc52d4
V
vue-element-admin
项目概览
InJoyU
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
69fc52d4
编写于
7月 28, 2017
作者:
P
Pan
提交者:
花裤衩
7月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine router.js
上级
d78b4980
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
65 addition
and
122 deletion
+65
-122
src/router/index.js
src/router/index.js
+65
-122
未找到文件。
src/router/index.js
浏览文件 @
69fc52d4
...
...
@@ -3,89 +3,30 @@ import Router from 'vue-router';
const
_import
=
require
(
'
./_import_
'
+
process
.
env
.
NODE_ENV
);
// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow.so only in production use Lazy Loading
/* layout */
import
Layout
from
'
../views/layout/Layout
'
;
/* login */
const
Login
=
_import
(
'
login/index
'
);
const
authRedirect
=
_import
(
'
login/authredirect
'
);
/* dashboard */
const
dashboard
=
_import
(
'
dashboard/index
'
);
/* Introduction */
const
Introduction
=
_import
(
'
introduction/index
'
);
/* components */
const
componentsIndex
=
_import
(
'
components/index
'
);
const
Tinymce
=
_import
(
'
components/tinymce
'
);
const
Markdown
=
_import
(
'
components/markdown
'
);
const
JsonEditor
=
_import
(
'
components/jsoneditor
'
);
const
DndList
=
_import
(
'
components/dndlist
'
);
const
AvatarUpload
=
_import
(
'
components/avatarUpload
'
);
const
Dropzone
=
_import
(
'
components/dropzone
'
);
const
Sticky
=
_import
(
'
components/sticky
'
);
const
SplitPane
=
_import
(
'
components/splitpane
'
);
const
CountTo
=
_import
(
'
components/countTo
'
);
const
Mixin
=
_import
(
'
components/mixin
'
);
const
BackToTop
=
_import
(
'
components/backToTop
'
)
/* charts */
const
chartIndex
=
_import
(
'
charts/index
'
);
const
KeyboardChart
=
_import
(
'
charts/keyboard
'
);
const
KeyboardChart2
=
_import
(
'
charts/keyboard2
'
);
const
LineMarker
=
_import
(
'
charts/line
'
);
const
MixChart
=
_import
(
'
charts/mixChart
'
);
/* error page */
const
Err404
=
_import
(
'
error/404
'
);
const
Err401
=
_import
(
'
error/401
'
);
/* error log */
const
ErrorLog
=
_import
(
'
errlog/index
'
);
/* excel */
const
ExcelDownload
=
_import
(
'
excel/index
'
);
const
SelectExcelDownload
=
_import
(
'
excel/selectExcel
'
);
/* theme */
const
Theme
=
_import
(
'
theme/index
'
);
/* example */
const
TableLayout
=
_import
(
'
example/table/index
'
);
const
DynamicTable
=
_import
(
'
example/table/dynamictable
'
);
const
Table
=
_import
(
'
example/table/table
'
);
const
DragTable
=
_import
(
'
example/table/dragTable
'
);
const
InlineEditTable
=
_import
(
'
example/table/inlineEditTable
'
);
const
Form
=
_import
(
'
example/form
'
);
const
Tab
=
_import
(
'
example/tab/index
'
);
/* permission */
const
Permission
=
_import
(
'
permission/index
'
);
Vue
.
use
(
Router
);
/**
* icon : the icon show in the sidebar
* hidden : if hidden:true will not show in the sidebar
* redirect : if redirect:noredirect will not redirct in the levelbar
* noDropdown : if noDropdown:true will not has submenu
* meta : { role: ['admin'] } will control the page role
**/
/* layout */
import
Layout
from
'
../views/layout/Layout
'
;
/**
* icon : the icon show in the sidebar
* hidden : if `hidden:true` will not show in the sidebar
* redirect : if `redirect:noredirect` will no redirct in the levelbar
* noDropdown : if `noDropdown:true` will has no submenu
* meta : { role: ['admin'] } will control the page role
**/
export
const
constantRouterMap
=
[
{
path
:
'
/login
'
,
component
:
Login
,
hidden
:
true
},
{
path
:
'
/authredirect
'
,
component
:
authRedirect
,
hidden
:
true
},
{
path
:
'
/404
'
,
component
:
Err404
,
hidden
:
true
},
{
path
:
'
/401
'
,
component
:
Err401
,
hidden
:
true
},
{
path
:
'
/login
'
,
component
:
_import
(
'
login/index
'
)
,
hidden
:
true
},
{
path
:
'
/authredirect
'
,
component
:
_import
(
'
login/authredirect
'
)
,
hidden
:
true
},
{
path
:
'
/404
'
,
component
:
_import
(
'
error/404
'
)
,
hidden
:
true
},
{
path
:
'
/401
'
,
component
:
_import
(
'
error/401
'
)
,
hidden
:
true
},
{
path
:
'
/
'
,
component
:
Layout
,
redirect
:
'
/dashboard
'
,
name
:
'
首页
'
,
hidden
:
true
,
children
:
[{
path
:
'
dashboard
'
,
component
:
dashboard
}]
children
:
[{
path
:
'
dashboard
'
,
component
:
_import
(
'
dashboard/index
'
)
}]
},
{
path
:
'
/introduction
'
,
...
...
@@ -93,7 +34,7 @@ export const constantRouterMap = [
redirect
:
'
/introduction/index
'
,
icon
:
'
xinrenzhinan
'
,
noDropdown
:
true
,
children
:
[{
path
:
'
index
'
,
component
:
Introduction
,
name
:
'
简述
'
}]
children
:
[{
path
:
'
index
'
,
component
:
_import
(
'
introduction/index
'
)
,
name
:
'
简述
'
}]
}
]
...
...
@@ -112,7 +53,7 @@ export const asyncRouterMap = [
icon
:
'
quanxian
'
,
meta
:
{
role
:
[
'
admin
'
]
},
noDropdown
:
true
,
children
:
[{
path
:
'
index
'
,
component
:
Permission
,
name
:
'
权限测试页
'
,
meta
:
{
role
:
[
'
admin
'
]
}
}]
children
:
[{
path
:
'
index
'
,
component
:
_import
(
'
permission/index
'
)
,
name
:
'
权限测试页
'
,
meta
:
{
role
:
[
'
admin
'
]
}
}]
},
{
path
:
'
/components
'
,
...
...
@@ -121,18 +62,18 @@ export const asyncRouterMap = [
name
:
'
组件
'
,
icon
:
'
zujian
'
,
children
:
[
{
path
:
'
index
'
,
component
:
componentsIndex
,
name
:
'
介绍
'
},
{
path
:
'
tinymce
'
,
component
:
Tinymce
,
name
:
'
富文本编辑器
'
},
{
path
:
'
markdown
'
,
component
:
Markdown
,
name
:
'
Markdown
'
},
{
path
:
'
jsoneditor
'
,
component
:
JsonEditor
,
name
:
'
JSON编辑器
'
},
{
path
:
'
dndlist
'
,
component
:
DndList
,
name
:
'
列表拖拽
'
},
{
path
:
'
splitpane
'
,
component
:
SplitPane
,
name
:
'
SplitPane
'
},
{
path
:
'
avatarupload
'
,
component
:
AvatarUpload
,
name
:
'
头像上传
'
},
{
path
:
'
dropzone
'
,
component
:
Dropzone
,
name
:
'
Dropzone
'
},
{
path
:
'
sticky
'
,
component
:
Sticky
,
name
:
'
Sticky
'
},
{
path
:
'
countto
'
,
component
:
CountTo
,
name
:
'
CountTo
'
},
{
path
:
'
mixin
'
,
component
:
Mixin
,
name
:
'
小组件
'
},
{
path
:
'
backtotop
'
,
component
:
BackToTop
,
name
:
'
返回顶部
'
}
{
path
:
'
index
'
,
component
:
_import
(
'
components/index
'
)
,
name
:
'
介绍
'
},
{
path
:
'
tinymce
'
,
component
:
_import
(
'
components/tinymce
'
)
,
name
:
'
富文本编辑器
'
},
{
path
:
'
markdown
'
,
component
:
_import
(
'
components/markdown
'
)
,
name
:
'
Markdown
'
},
{
path
:
'
jsoneditor
'
,
component
:
_import
(
'
components/jsoneditor
'
)
,
name
:
'
JSON编辑器
'
},
{
path
:
'
dndlist
'
,
component
:
_import
(
'
components/dndlist
'
)
,
name
:
'
列表拖拽
'
},
{
path
:
'
splitpane
'
,
component
:
_import
(
'
components/splitpane
'
)
,
name
:
'
SplitPane
'
},
{
path
:
'
avatarupload
'
,
component
:
_import
(
'
components/avatarUpload
'
)
,
name
:
'
头像上传
'
},
{
path
:
'
dropzone
'
,
component
:
_import
(
'
components/dropzone
'
)
,
name
:
'
Dropzone
'
},
{
path
:
'
sticky
'
,
component
:
_import
(
'
components/sticky
'
)
,
name
:
'
Sticky
'
},
{
path
:
'
countto
'
,
component
:
_import
(
'
components/countTo
'
)
,
name
:
'
CountTo
'
},
{
path
:
'
mixin
'
,
component
:
_import
(
'
components/mixin
'
)
,
name
:
'
小组件
'
},
{
path
:
'
backtotop
'
,
component
:
_import
(
'
components/backToTop
'
)
,
name
:
'
返回顶部
'
}
]
},
{
...
...
@@ -142,11 +83,37 @@ export const asyncRouterMap = [
name
:
'
图表
'
,
icon
:
'
tubiaoleixingzhengchang
'
,
children
:
[
{
path
:
'
index
'
,
component
:
chartIndex
,
name
:
'
介绍
'
},
{
path
:
'
keyboard
'
,
component
:
KeyboardChart
,
name
:
'
键盘图表
'
},
{
path
:
'
keyboard2
'
,
component
:
KeyboardChart2
,
name
:
'
键盘图表2
'
},
{
path
:
'
line
'
,
component
:
LineMarker
,
name
:
'
折线图
'
},
{
path
:
'
mixchart
'
,
component
:
MixChart
,
name
:
'
混合图表
'
}
{
path
:
'
index
'
,
component
:
_import
(
'
charts/index
'
),
name
:
'
介绍
'
},
{
path
:
'
keyboard
'
,
component
:
_import
(
'
charts/keyboard
'
),
name
:
'
键盘图表
'
},
{
path
:
'
keyboard2
'
,
component
:
_import
(
'
charts/keyboard2
'
),
name
:
'
键盘图表2
'
},
{
path
:
'
line
'
,
component
:
_import
(
'
charts/line
'
),
name
:
'
折线图
'
},
{
path
:
'
mixchart
'
,
component
:
_import
(
'
charts/mixChart
'
),
name
:
'
混合图表
'
}
]
},
{
path
:
'
/example
'
,
component
:
Layout
,
redirect
:
'
noredirect
'
,
name
:
'
综合实例
'
,
icon
:
'
zonghe
'
,
children
:
[
{
path
:
'
/example/table
'
,
component
:
_import
(
'
example/table/index
'
),
redirect
:
'
/example/table/table
'
,
name
:
'
Table
'
,
icon
:
'
table
'
,
children
:
[
{
path
:
'
dynamictable
'
,
component
:
_import
(
'
example/table/dynamictable
'
),
name
:
'
动态table
'
},
{
path
:
'
dragtable
'
,
component
:
_import
(
'
example/table/dragTable
'
),
name
:
'
拖拽table
'
},
{
path
:
'
inline_edit_table
'
,
component
:
_import
(
'
example/table/inlineEditTable
'
),
name
:
'
table内编辑
'
},
{
path
:
'
table
'
,
component
:
_import
(
'
example/table/table
'
),
name
:
'
综合table
'
}
]
},
{
path
:
'
form/edit
'
,
icon
:
'
ziliaoshouce
'
,
component
:
_import
(
'
example/form
'
),
name
:
'
编辑Form
'
,
meta
:
{
isEdit
:
true
}
},
{
path
:
'
form/create
'
,
icon
:
'
yinhangqia
'
,
component
:
_import
(
'
example/form
'
),
name
:
'
创建Form
'
},
{
path
:
'
tab/index
'
,
icon
:
'
mobankuangjia
'
,
component
:
_import
(
'
example/tab/index
'
),
name
:
'
Tab
'
}
]
},
{
...
...
@@ -156,8 +123,8 @@ export const asyncRouterMap = [
name
:
'
错误页面
'
,
icon
:
'
404
'
,
children
:
[
{
path
:
'
401
'
,
component
:
Err401
,
name
:
'
401
'
},
{
path
:
'
404
'
,
component
:
Err404
,
name
:
'
404
'
}
{
path
:
'
401
'
,
component
:
_import
(
'
error/401
'
)
,
name
:
'
401
'
},
{
path
:
'
404
'
,
component
:
_import
(
'
error/404
'
)
,
name
:
'
404
'
}
]
},
{
...
...
@@ -167,7 +134,7 @@ export const asyncRouterMap = [
name
:
'
errlog
'
,
icon
:
'
bug
'
,
noDropdown
:
true
,
children
:
[{
path
:
'
log
'
,
component
:
ErrorLog
,
name
:
'
错误日志
'
}]
children
:
[{
path
:
'
log
'
,
component
:
_import
(
'
errlog/index
'
)
,
name
:
'
错误日志
'
}]
},
{
path
:
'
/excel
'
,
...
...
@@ -176,8 +143,8 @@ export const asyncRouterMap = [
name
:
'
excel
'
,
icon
:
'
EXCEL
'
,
children
:
[
{
path
:
'
download
'
,
component
:
ExcelDownload
,
name
:
'
导出excel
'
},
{
path
:
'
download2
'
,
component
:
SelectExcelDownload
,
name
:
'
选择导出excel
'
}
{
path
:
'
download
'
,
component
:
_import
(
'
excel/index
'
)
,
name
:
'
导出excel
'
},
{
path
:
'
download2
'
,
component
:
_import
(
'
excel/selectExcel
'
)
,
name
:
'
选择导出excel
'
}
]
},
{
...
...
@@ -187,32 +154,8 @@ export const asyncRouterMap = [
name
:
'
theme
'
,
icon
:
'
theme
'
,
noDropdown
:
true
,
children
:
[{
path
:
'
index
'
,
component
:
Theme
,
name
:
'
换肤
'
}]
children
:
[{
path
:
'
index
'
,
component
:
_import
(
'
theme/index
'
)
,
name
:
'
换肤
'
}]
},
{
path
:
'
/example
'
,
component
:
Layout
,
redirect
:
'
noredirect
'
,
name
:
'
综合实例
'
,
icon
:
'
zonghe
'
,
children
:
[
{
path
:
'
/example/table
'
,
component
:
TableLayout
,
redirect
:
'
/example/table/table
'
,
name
:
'
Table
'
,
children
:
[
{
path
:
'
dynamictable
'
,
component
:
DynamicTable
,
name
:
'
动态table
'
},
{
path
:
'
dragtable
'
,
component
:
DragTable
,
name
:
'
拖拽table
'
},
{
path
:
'
inline_edit_table
'
,
component
:
InlineEditTable
,
name
:
'
table内编辑
'
},
{
path
:
'
table
'
,
component
:
Table
,
name
:
'
综合table
'
}
]
},
{
path
:
'
form/edit
'
,
component
:
Form
,
name
:
'
编辑Form
'
,
meta
:
{
isEdit
:
true
}
},
{
path
:
'
form/create
'
,
component
:
Form
,
name
:
'
创建Form
'
},
{
path
:
'
tab/index
'
,
component
:
Tab
,
name
:
'
Tab
'
}
]
},
{
path
:
'
*
'
,
redirect
:
'
/404
'
,
hidden
:
true
}
];
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录