Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
InJoyU
vue-element-admin
提交
677ef6db
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,发现更多精彩内容 >>
提交
677ef6db
编写于
5月 29, 2017
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
router Code Splitting use import replace require.ensure
上级
6ff36d82
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
75 addition
and
75 deletion
+75
-75
src/router/index.js
src/router/index.js
+75
-75
未找到文件。
src/router/index.js
浏览文件 @
677ef6db
import
Vue
from
'
vue
'
;
import
Router
from
'
vue-router
'
;
/* layout*/
/* layout
*/
import
Layout
from
'
../views/layout/Layout
'
;
// dashboard
const
dashboard
=
resolve
=>
require
([
'
../views/dashboard/index
'
],
resolve
);
/* error page*/
const
Err404
=
resolve
=>
require
([
'
../views/error/404
'
],
resolve
);
const
Err401
=
resolve
=>
require
([
'
../views/error/401
'
],
resolve
);
/* login*/
/* login */
import
Login
from
'
../views/login/
'
;
import
authRedirect
from
'
../views/login/authredirect
'
;
import
sendPWD
from
'
../views/login/sendpwd
'
;
import
reset
from
'
../views/login/reset
'
;
/* Introduction*/
const
Introduction
=
resolve
=>
require
([
'
../views/introduction/index
'
],
resolve
);
/* components*/
const
componentsIndex
=
resolve
=>
require
([
'
../views/components/index
'
],
resolve
);
const
Tinymce
=
resolve
=>
require
([
'
../views/components/tinymce
'
],
resolve
);
const
Markdown
=
resolve
=>
require
([
'
../views/components/markdown
'
],
resolve
);
const
JsonEditor
=
resolve
=>
require
([
'
../views/components/jsoneditor
'
],
resolve
);
const
DndList
=
resolve
=>
require
([
'
../views/components/dndlist
'
],
resolve
);
const
AvatarUpload
=
resolve
=>
require
([
'
../views/components/avatarUpload
'
],
resolve
);
const
Dropzone
=
resolve
=>
require
([
'
../views/components/dropzone
'
],
resolve
);
const
Sticky
=
resolve
=>
require
([
'
../views/components/sticky
'
],
resolve
);
const
SplitPane
=
resolve
=>
require
([
'
../views/components/splitpane
'
],
resolve
);
const
CountTo
=
resolve
=>
require
([
'
../views/components/countTo
'
],
resolve
);
const
Mixin
=
resolve
=>
require
([
'
../views/components/mixin
'
],
resolve
);
/* charts*/
const
chartIndex
=
resolve
=>
require
([
'
../views/charts/index
'
],
resolve
);
const
KeyboardChart
=
resolve
=>
require
([
'
../views/charts/keyboard
'
],
resolve
);
const
KeyboardChart2
=
resolve
=>
require
([
'
../views/charts/keyboard2
'
],
resolve
);
const
LineMarker
=
resolve
=>
require
([
'
../views/charts/line
'
],
resolve
);
const
MixChart
=
resolve
=>
require
([
'
../views/charts/mixchart
'
],
resolve
);
/* error log*/
const
ErrorLog
=
resolve
=>
require
([
'
../views/errlog/index
'
],
resolve
);
/* excel*/
const
ExcelDownload
=
resolve
=>
require
([
'
../views/excel/index
'
],
resolve
);
/* theme*/
const
Theme
=
resolve
=>
require
([
'
../views/theme/index
'
],
resolve
);
const
authRedirect
=
()
=>
import
(
'
../views/login/authredirect
'
);
const
sendPWD
=
()
=>
import
(
'
../views/login/sendpwd
'
);
const
reset
=
()
=>
import
(
'
../views/login/reset
'
);
/* dashboard */
const
dashboard
=
()
=>
import
(
'
../views/dashboard/index
'
);
/* Introduction */
const
Introduction
=
()
=>
import
(
'
../views/introduction/index
'
);
/* components */
const
componentsIndex
=
()
=>
import
(
'
../views/components/index
'
);
const
Tinymce
=
()
=>
import
(
'
../views/components/tinymce
'
);
const
Markdown
=
()
=>
import
(
'
../views/components/markdown
'
);
const
JsonEditor
=
()
=>
import
(
'
../views/components/jsoneditor
'
);
const
DndList
=
()
=>
import
(
'
../views/components/dndlist
'
);
const
AvatarUpload
=
()
=>
import
(
'
../views/components/avatarUpload
'
);
const
Dropzone
=
()
=>
import
(
'
../views/components/dropzone
'
);
const
Sticky
=
()
=>
import
(
'
../views/components/sticky
'
);
const
SplitPane
=
()
=>
import
(
'
../views/components/splitpane
'
);
const
CountTo
=
()
=>
import
(
'
../views/components/countTo
'
);
const
Mixin
=
()
=>
import
(
'
../views/components/mixin
'
);
/* charts */
const
chartIndex
=
()
=>
import
(
'
../views/charts/index
'
);
const
KeyboardChart
=
()
=>
import
(
'
../views/charts/keyboard
'
);
const
KeyboardChart2
=
()
=>
import
(
'
../views/charts/keyboard2
'
);
const
LineMarker
=
()
=>
import
(
'
../views/charts/line
'
);
const
MixChart
=
()
=>
import
(
'
../views/charts/mixchart
'
);
/* error page */
const
Err404
=
()
=>
import
(
'
../views/error/404
'
);
const
Err401
=
()
=>
import
(
'
../views/error/401
'
);
/* error log */
const
ErrorLog
=
()
=>
import
(
'
../views/errlog/index
'
);
/* excel */
const
ExcelDownload
=
()
=>
import
(
'
../views/excel/index
'
);
/* theme */
const
Theme
=
()
=>
import
(
'
../views/theme/index
'
);
/* example*/
const
DynamicTable
=
resolve
=>
require
([
'
../views/example/dynamictable
'
],
resolve
);
const
Table
=
resolve
=>
require
([
'
../views/example/table
'
],
resolve
);
const
DragTable
=
resolve
=>
require
([
'
../views/example/dragTable
'
],
resolve
);
const
InlineEditTable
=
resolve
=>
require
([
'
../views/example/inlineEditTable
'
],
resolve
);
const
Form1
=
resolve
=>
require
([
'
../views/example/form1
'
],
resolve
);
const
DynamicTable
=
()
=>
import
(
'
../views/example/dynamictable
'
);
const
Table
=
()
=>
import
(
'
../views/example/table
'
);
const
DragTable
=
()
=>
import
(
'
../views/example/dragTable
'
);
const
InlineEditTable
=
()
=>
import
(
'
../views/example/inlineEditTable
'
);
const
Form1
=
()
=>
import
(
'
../views/example/form1
'
);
/* permission */
const
Permission
=
resolve
=>
require
([
'
../views/permission/index
'
],
resolve
);
const
Permission
=
()
=>
import
(
'
../views/permission/index
'
);
Vue
.
use
(
Router
);
...
...
@@ -69,7 +69,7 @@ Vue.use(Router);
* 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
*/
*
*
/
export
const
constantRouterMap
=
[
{
path
:
'
/login
'
,
component
:
Login
,
hidden
:
true
},
...
...
@@ -120,17 +120,17 @@ 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
:
'
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
:
'
小组件
'
}
]
},
{
...
...
@@ -140,11 +140,11 @@ 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
:
chartIndex
,
name
:
'
介绍
'
},
{
path
:
'
keyboard
'
,
component
:
KeyboardChart
,
name
:
'
键盘图表
'
},
{
path
:
'
keyboard2
'
,
component
:
KeyboardChart2
,
name
:
'
键盘图表2
'
},
{
path
:
'
line
'
,
component
:
LineMarker
,
name
:
'
折线图
'
},
{
path
:
'
mixchart
'
,
component
:
MixChart
,
name
:
'
混合图表
'
}
]
},
{
...
...
@@ -154,8 +154,8 @@ export const asyncRouterMap = [
name
:
'
错误页面
'
,
icon
:
'
404
'
,
children
:
[
{
path
:
'
401
'
,
component
:
Err401
,
name
:
'
401
'
},
{
path
:
'
404
'
,
component
:
Err404
,
name
:
'
404
'
}
{
path
:
'
401
'
,
component
:
Err401
,
name
:
'
401
'
},
{
path
:
'
404
'
,
component
:
Err404
,
name
:
'
404
'
}
]
},
{
...
...
@@ -192,11 +192,11 @@ export const asyncRouterMap = [
name
:
'
综合实例
'
,
icon
:
'
zonghe
'
,
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
:
'
form1
'
,
component
:
Form1
,
name
:
'
综合form1
'
}
{
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
:
'
form1
'
,
component
:
Form1
,
name
:
'
综合form1
'
}
]
},
{
path
:
'
*
'
,
redirect
:
'
/404
'
,
hidden
:
true
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录