Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
7ffd48dd
Commit
7ffd48dd
authored
Nov 20, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import -> ()=>import Fixed:
https://github.com/ant-design/ant-design-pro/issues/228
parent
0c0cb87e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
src/common/nav.js
src/common/nav.js
+28
-28
No files found.
src/common/nav.js
View file @
7ffd48dd
...
@@ -4,13 +4,13 @@ import dynamic from 'dva/dynamic';
...
@@ -4,13 +4,13 @@ import dynamic from 'dva/dynamic';
const
dynamicWrapper
=
(
app
,
models
,
component
)
=>
dynamic
({
const
dynamicWrapper
=
(
app
,
models
,
component
)
=>
dynamic
({
app
,
app
,
models
:
()
=>
models
.
map
(
m
=>
import
(
`../models/
${
m
}
.js`
)),
models
:
()
=>
models
.
map
(
m
=>
import
(
`../models/
${
m
}
.js`
)),
component
:
()
=>
component
,
component
,
});
});
// nav data
// nav data
export
const
getNavData
=
app
=>
[
export
const
getNavData
=
app
=>
[
{
{
component
:
dynamicWrapper
(
app
,
[
'
user
'
],
import
(
'
../layouts/BasicLayout
'
)),
component
:
dynamicWrapper
(
app
,
[
'
user
'
],
()
=>
import
(
'
../layouts/BasicLayout
'
)),
layout
:
'
BasicLayout
'
,
layout
:
'
BasicLayout
'
,
name
:
'
首页
'
,
// for breadcrumb
name
:
'
首页
'
,
// for breadcrumb
path
:
'
/
'
,
path
:
'
/
'
,
...
@@ -23,17 +23,17 @@ export const getNavData = app => [
...
@@ -23,17 +23,17 @@ export const getNavData = app => [
{
{
name
:
'
分析页
'
,
name
:
'
分析页
'
,
path
:
'
analysis
'
,
path
:
'
analysis
'
,
component
:
dynamicWrapper
(
app
,
[
'
chart
'
],
import
(
'
../routes/Dashboard/Analysis
'
)),
component
:
dynamicWrapper
(
app
,
[
'
chart
'
],
()
=>
import
(
'
../routes/Dashboard/Analysis
'
)),
},
},
{
{
name
:
'
监控页
'
,
name
:
'
监控页
'
,
path
:
'
monitor
'
,
path
:
'
monitor
'
,
component
:
dynamicWrapper
(
app
,
[
'
monitor
'
],
import
(
'
../routes/Dashboard/Monitor
'
)),
component
:
dynamicWrapper
(
app
,
[
'
monitor
'
],
()
=>
import
(
'
../routes/Dashboard/Monitor
'
)),
},
},
{
{
name
:
'
工作台
'
,
name
:
'
工作台
'
,
path
:
'
workplace
'
,
path
:
'
workplace
'
,
component
:
dynamicWrapper
(
app
,
[
'
project
'
,
'
activities
'
,
'
chart
'
],
import
(
'
../routes/Dashboard/Workplace
'
)),
component
:
dynamicWrapper
(
app
,
[
'
project
'
,
'
activities
'
,
'
chart
'
],
()
=>
import
(
'
../routes/Dashboard/Workplace
'
)),
},
},
],
],
},
},
...
@@ -45,27 +45,27 @@ export const getNavData = app => [
...
@@ -45,27 +45,27 @@ export const getNavData = app => [
{
{
name
:
'
基础表单
'
,
name
:
'
基础表单
'
,
path
:
'
basic-form
'
,
path
:
'
basic-form
'
,
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
import
(
'
../routes/Forms/BasicForm
'
)),
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
()
=>
import
(
'
../routes/Forms/BasicForm
'
)),
},
},
{
{
name
:
'
分步表单
'
,
name
:
'
分步表单
'
,
path
:
'
step-form
'
,
path
:
'
step-form
'
,
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
import
(
'
../routes/Forms/StepForm
'
)),
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
()
=>
import
(
'
../routes/Forms/StepForm
'
)),
children
:
[
children
:
[
{
{
path
:
'
confirm
'
,
path
:
'
confirm
'
,
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
import
(
'
../routes/Forms/StepForm/Step2
'
)),
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
()
=>
import
(
'
../routes/Forms/StepForm/Step2
'
)),
},
},
{
{
path
:
'
result
'
,
path
:
'
result
'
,
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
import
(
'
../routes/Forms/StepForm/Step3
'
)),
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
()
=>
import
(
'
../routes/Forms/StepForm/Step3
'
)),
},
},
],
],
},
},
{
{
name
:
'
高级表单
'
,
name
:
'
高级表单
'
,
path
:
'
advanced-form
'
,
path
:
'
advanced-form
'
,
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
import
(
'
../routes/Forms/AdvancedForm
'
)),
component
:
dynamicWrapper
(
app
,
[
'
form
'
],
()
=>
import
(
'
../routes/Forms/AdvancedForm
'
)),
},
},
],
],
},
},
...
@@ -77,32 +77,32 @@ export const getNavData = app => [
...
@@ -77,32 +77,32 @@ export const getNavData = app => [
{
{
name
:
'
查询表格
'
,
name
:
'
查询表格
'
,
path
:
'
table-list
'
,
path
:
'
table-list
'
,
component
:
dynamicWrapper
(
app
,
[
'
rule
'
],
import
(
'
../routes/List/TableList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
rule
'
],
()
=>
import
(
'
../routes/List/TableList
'
)),
},
},
{
{
name
:
'
标准列表
'
,
name
:
'
标准列表
'
,
path
:
'
basic-list
'
,
path
:
'
basic-list
'
,
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
import
(
'
../routes/List/BasicList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
()
=>
import
(
'
../routes/List/BasicList
'
)),
},
},
{
{
name
:
'
卡片列表
'
,
name
:
'
卡片列表
'
,
path
:
'
card-list
'
,
path
:
'
card-list
'
,
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
import
(
'
../routes/List/CardList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
()
=>
import
(
'
../routes/List/CardList
'
)),
},
},
{
{
name
:
'
搜索列表(项目)
'
,
name
:
'
搜索列表(项目)
'
,
path
:
'
cover-card-list
'
,
path
:
'
cover-card-list
'
,
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
import
(
'
../routes/List/CoverCardList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
()
=>
import
(
'
../routes/List/CoverCardList
'
)),
},
},
{
{
name
:
'
搜索列表(应用)
'
,
name
:
'
搜索列表(应用)
'
,
path
:
'
filter-card-list
'
,
path
:
'
filter-card-list
'
,
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
import
(
'
../routes/List/FilterCardList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
()
=>
import
(
'
../routes/List/FilterCardList
'
)),
},
},
{
{
name
:
'
搜索列表(文章)
'
,
name
:
'
搜索列表(文章)
'
,
path
:
'
search
'
,
path
:
'
search
'
,
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
import
(
'
../routes/List/SearchList
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
],
()
=>
import
(
'
../routes/List/SearchList
'
)),
},
},
],
],
},
},
...
@@ -114,12 +114,12 @@ export const getNavData = app => [
...
@@ -114,12 +114,12 @@ export const getNavData = app => [
{
{
name
:
'
基础详情页
'
,
name
:
'
基础详情页
'
,
path
:
'
basic
'
,
path
:
'
basic
'
,
component
:
dynamicWrapper
(
app
,
[
'
profile
'
],
import
(
'
../routes/Profile/BasicProfile
'
)),
component
:
dynamicWrapper
(
app
,
[
'
profile
'
],
()
=>
import
(
'
../routes/Profile/BasicProfile
'
)),
},
},
{
{
name
:
'
高级详情页
'
,
name
:
'
高级详情页
'
,
path
:
'
advanced
'
,
path
:
'
advanced
'
,
component
:
dynamicWrapper
(
app
,
[
'
profile
'
],
import
(
'
../routes/Profile/AdvancedProfile
'
)),
component
:
dynamicWrapper
(
app
,
[
'
profile
'
],
()
=>
import
(
'
../routes/Profile/AdvancedProfile
'
)),
},
},
],
],
},
},
...
@@ -131,12 +131,12 @@ export const getNavData = app => [
...
@@ -131,12 +131,12 @@ export const getNavData = app => [
{
{
name
:
'
成功
'
,
name
:
'
成功
'
,
path
:
'
success
'
,
path
:
'
success
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/Result/Success
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/Result/Success
'
)),
},
},
{
{
name
:
'
失败
'
,
name
:
'
失败
'
,
path
:
'
fail
'
,
path
:
'
fail
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/Result/Error
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/Result/Error
'
)),
},
},
],
],
},
},
...
@@ -148,24 +148,24 @@ export const getNavData = app => [
...
@@ -148,24 +148,24 @@ export const getNavData = app => [
{
{
name
:
'
403
'
,
name
:
'
403
'
,
path
:
'
403
'
,
path
:
'
403
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/Exception/403
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/Exception/403
'
)),
},
},
{
{
name
:
'
404
'
,
name
:
'
404
'
,
path
:
'
404
'
,
path
:
'
404
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/Exception/404
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/Exception/404
'
)),
},
},
{
{
name
:
'
500
'
,
name
:
'
500
'
,
path
:
'
500
'
,
path
:
'
500
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/Exception/500
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/Exception/500
'
)),
},
},
],
],
},
},
],
],
},
},
{
{
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../layouts/UserLayout
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../layouts/UserLayout
'
)),
path
:
'
/user
'
,
path
:
'
/user
'
,
layout
:
'
UserLayout
'
,
layout
:
'
UserLayout
'
,
children
:
[
children
:
[
...
@@ -177,24 +177,24 @@ export const getNavData = app => [
...
@@ -177,24 +177,24 @@ export const getNavData = app => [
{
{
name
:
'
登录
'
,
name
:
'
登录
'
,
path
:
'
login
'
,
path
:
'
login
'
,
component
:
dynamicWrapper
(
app
,
[
'
login
'
],
import
(
'
../routes/User/Login
'
)),
component
:
dynamicWrapper
(
app
,
[
'
login
'
],
()
=>
import
(
'
../routes/User/Login
'
)),
},
},
{
{
name
:
'
注册
'
,
name
:
'
注册
'
,
path
:
'
register
'
,
path
:
'
register
'
,
component
:
dynamicWrapper
(
app
,
[
'
register
'
],
import
(
'
../routes/User/Register
'
)),
component
:
dynamicWrapper
(
app
,
[
'
register
'
],
()
=>
import
(
'
../routes/User/Register
'
)),
},
},
{
{
name
:
'
注册结果
'
,
name
:
'
注册结果
'
,
path
:
'
register-result
'
,
path
:
'
register-result
'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../routes/User/RegisterResult
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/User/RegisterResult
'
)),
},
},
],
],
},
},
],
],
},
},
{
{
component
:
dynamicWrapper
(
app
,
[],
import
(
'
../layouts/BlankLayout
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../layouts/BlankLayout
'
)),
layout
:
'
BlankLayout
'
,
layout
:
'
BlankLayout
'
,
children
:
{
children
:
{
name
:
'
使用文档
'
,
name
:
'
使用文档
'
,
...
...
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