Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ant-design-pro
Project
Project
Details
Activity
Releases
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thiago Borges
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
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';
const
dynamicWrapper
=
(
app
,
models
,
component
)
=>
dynamic
({
app
,
models
:
()
=>
models
.
map
(
m
=>
import
(
`../models/
${
m
}
.js`
)),
component
:
()
=>
component
,
component
,
});
// nav data
export
const
getNavData
=
app
=>
[
{
component
:
dynamicWrapper
(
app
,
[
'user'
],
import
(
'../layouts/BasicLayout'
)),
component
:
dynamicWrapper
(
app
,
[
'user'
],
()
=>
import
(
'../layouts/BasicLayout'
)),
layout
:
'BasicLayout'
,
name
:
'首页'
,
// for breadcrumb
path
:
'/'
,
...
...
@@ -23,17 +23,17 @@ export const getNavData = app => [
{
name
:
'分析页'
,
path
:
'analysis'
,
component
:
dynamicWrapper
(
app
,
[
'chart'
],
import
(
'../routes/Dashboard/Analysis'
)),
component
:
dynamicWrapper
(
app
,
[
'chart'
],
()
=>
import
(
'../routes/Dashboard/Analysis'
)),
},
{
name
:
'监控页'
,
path
:
'monitor'
,
component
:
dynamicWrapper
(
app
,
[
'monitor'
],
import
(
'../routes/Dashboard/Monitor'
)),
component
:
dynamicWrapper
(
app
,
[
'monitor'
],
()
=>
import
(
'../routes/Dashboard/Monitor'
)),
},
{
name
:
'工作台'
,
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 => [
{
name
:
'基础表单'
,
path
:
'basic-form'
,
component
:
dynamicWrapper
(
app
,
[
'form'
],
import
(
'../routes/Forms/BasicForm'
)),
component
:
dynamicWrapper
(
app
,
[
'form'
],
()
=>
import
(
'../routes/Forms/BasicForm'
)),
},
{
name
:
'分步表单'
,
path
:
'step-form'
,
component
:
dynamicWrapper
(
app
,
[
'form'
],
import
(
'../routes/Forms/StepForm'
)),
component
:
dynamicWrapper
(
app
,
[
'form'
],
()
=>
import
(
'../routes/Forms/StepForm'
)),
children
:
[
{
path
:
'confirm'
,
component
:
dynamicWrapper
(
app
,
[
'form'
],
import
(
'../routes/Forms/StepForm/Step2'
)),
component
:
dynamicWrapper
(
app
,
[
'form'
],
()
=>
import
(
'../routes/Forms/StepForm/Step2'
)),
},
{
path
:
'result'
,
component
:
dynamicWrapper
(
app
,
[
'form'
],
import
(
'../routes/Forms/StepForm/Step3'
)),
component
:
dynamicWrapper
(
app
,
[
'form'
],
()
=>
import
(
'../routes/Forms/StepForm/Step3'
)),
},
],
},
{
name
:
'高级表单'
,
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 => [
{
name
:
'查询表格'
,
path
:
'table-list'
,
component
:
dynamicWrapper
(
app
,
[
'rule'
],
import
(
'../routes/List/TableList'
)),
component
:
dynamicWrapper
(
app
,
[
'rule'
],
()
=>
import
(
'../routes/List/TableList'
)),
},
{
name
:
'标准列表'
,
path
:
'basic-list'
,
component
:
dynamicWrapper
(
app
,
[
'list'
],
import
(
'../routes/List/BasicList'
)),
component
:
dynamicWrapper
(
app
,
[
'list'
],
()
=>
import
(
'../routes/List/BasicList'
)),
},
{
name
:
'卡片列表'
,
path
:
'card-list'
,
component
:
dynamicWrapper
(
app
,
[
'list'
],
import
(
'../routes/List/CardList'
)),
component
:
dynamicWrapper
(
app
,
[
'list'
],
()
=>
import
(
'../routes/List/CardList'
)),
},
{
name
:
'搜索列表(项目)'
,
path
:
'cover-card-list'
,
component
:
dynamicWrapper
(
app
,
[
'list'
],
import
(
'../routes/List/CoverCardList'
)),
component
:
dynamicWrapper
(
app
,
[
'list'
],
()
=>
import
(
'../routes/List/CoverCardList'
)),
},
{
name
:
'搜索列表(应用)'
,
path
:
'filter-card-list'
,
component
:
dynamicWrapper
(
app
,
[
'list'
],
import
(
'../routes/List/FilterCardList'
)),
component
:
dynamicWrapper
(
app
,
[
'list'
],
()
=>
import
(
'../routes/List/FilterCardList'
)),
},
{
name
:
'搜索列表(文章)'
,
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 => [
{
name
:
'基础详情页'
,
path
:
'basic'
,
component
:
dynamicWrapper
(
app
,
[
'profile'
],
import
(
'../routes/Profile/BasicProfile'
)),
component
:
dynamicWrapper
(
app
,
[
'profile'
],
()
=>
import
(
'../routes/Profile/BasicProfile'
)),
},
{
name
:
'高级详情页'
,
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 => [
{
name
:
'成功'
,
path
:
'success'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'../routes/Result/Success'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'../routes/Result/Success'
)),
},
{
name
:
'失败'
,
path
:
'fail'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'../routes/Result/Error'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'../routes/Result/Error'
)),
},
],
},
...
...
@@ -148,24 +148,24 @@ export const getNavData = app => [
{
name
:
'403'
,
path
:
'403'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'../routes/Exception/403'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'../routes/Exception/403'
)),
},
{
name
:
'404'
,
path
:
'404'
,
component
:
dynamicWrapper
(
app
,
[],
import
(
'../routes/Exception/404'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'../routes/Exception/404'
)),
},
{
name
:
'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'
,
layout
:
'UserLayout'
,
children
:
[
...
...
@@ -177,24 +177,24 @@ export const getNavData = app => [
{
name
:
'登录'
,
path
:
'login'
,
component
:
dynamicWrapper
(
app
,
[
'login'
],
import
(
'../routes/User/Login'
)),
component
:
dynamicWrapper
(
app
,
[
'login'
],
()
=>
import
(
'../routes/User/Login'
)),
},
{
name
:
'注册'
,
path
:
'register'
,
component
:
dynamicWrapper
(
app
,
[
'register'
],
import
(
'../routes/User/Register'
)),
component
:
dynamicWrapper
(
app
,
[
'register'
],
()
=>
import
(
'../routes/User/Register'
)),
},
{
name
:
'注册结果'
,
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'
,
children
:
{
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