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
P
pro-blocks
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
pro-blocks
Commits
24e9ab7f
Commit
24e9ab7f
authored
Aug 22, 2018
by
zinkey
Committed by
偏右
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed umi/link umi/router
parent
81895705
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
41 additions
and
40 deletions
+41
-40
src/components/GlobalHeader/index.js
src/components/GlobalHeader/index.js
+1
-1
src/components/SiderMenu/BaseMenu.js
src/components/SiderMenu/BaseMenu.js
+1
-1
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+1
-1
src/components/SiderMenu/SliderMenu.js
src/components/SiderMenu/SliderMenu.js
+1
-1
src/components/TopNavHeader/index.js
src/components/TopNavHeader/index.js
+1
-1
src/layouts/Header.js
src/layouts/Header.js
+4
-4
src/layouts/PageHeaderLayout.js
src/layouts/PageHeaderLayout.js
+1
-1
src/layouts/UserLayout.js
src/layouts/UserLayout.js
+1
-1
src/pages/404.js
src/pages/404.js
+1
-1
src/pages/Account/Center/Center.js
src/pages/Account/Center/Center.js
+6
-5
src/pages/Account/Settings/Info.js
src/pages/Account/Settings/Info.js
+2
-3
src/pages/Dashboard/Workplace.js
src/pages/Dashboard/Workplace.js
+1
-1
src/pages/Exception/403.js
src/pages/Exception/403.js
+1
-1
src/pages/Exception/404.js
src/pages/Exception/404.js
+1
-1
src/pages/Exception/500.js
src/pages/Exception/500.js
+1
-1
src/pages/Forms/StepForm/Step1.js
src/pages/Forms/StepForm/Step1.js
+2
-2
src/pages/Forms/StepForm/Step2.js
src/pages/Forms/StepForm/Step2.js
+2
-2
src/pages/Forms/StepForm/Step3.js
src/pages/Forms/StepForm/Step3.js
+3
-3
src/pages/List/List.js
src/pages/List/List.js
+5
-5
src/pages/User/Login.js
src/pages/User/Login.js
+1
-1
src/pages/User/Register.js
src/pages/User/Register.js
+3
-2
src/pages/User/RegisterResult.js
src/pages/User/RegisterResult.js
+1
-1
No files found.
src/components/GlobalHeader/index.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
Icon
,
Divider
}
from
'
antd
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Debounce
from
'
lodash-decorators/debounce
'
;
import
styles
from
'
./index.less
'
;
import
RightContent
from
'
./RightContent
'
;
...
...
src/components/SiderMenu/BaseMenu.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
Menu
,
Icon
}
from
'
antd
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
pathToRegexp
from
'
path-to-regexp
'
;
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
...
...
src/components/SiderMenu/SiderMenu.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
Layout
,
Menu
,
Icon
}
from
'
antd
'
;
import
pathToRegexp
from
'
path-to-regexp
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
styles
from
'
./index.less
'
;
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
...
...
src/components/SiderMenu/SliderMenu.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
Layout
}
from
'
antd
'
;
import
pathToRegexp
from
'
path-to-regexp
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
styles
from
'
./index.less
'
;
import
BaseMenu
,
{
getMenuMatches
}
from
'
./BaseMenu
'
;
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
...
...
src/components/TopNavHeader/index.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
RightContent
from
'
../GlobalHeader/RightContent
'
;
import
BaseMenu
from
'
../SiderMenu/BaseMenu
'
;
import
styles
from
'
./index.less
'
;
...
...
src/layouts/Header.js
View file @
24e9ab7f
...
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import
{
Layout
,
message
}
from
'
antd
'
;
import
Animate
from
'
rc-animate
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
GlobalHeader
from
'
@/components/GlobalHeader
'
;
import
TopNavHeader
from
'
@/components/TopNavHeader
'
;
import
styles
from
'
./Header.less
'
;
...
...
@@ -44,15 +44,15 @@ class HeaderView extends PureComponent {
handleMenuClick
=
({
key
})
=>
{
const
{
dispatch
}
=
this
.
props
;
if
(
key
===
'
userCenter
'
)
{
dispatch
(
routerRedux
.
push
(
'
/account/center
'
)
);
router
.
push
(
'
/account/center
'
);
return
;
}
if
(
key
===
'
triggerError
'
)
{
dispatch
(
routerRedux
.
push
(
'
/exception/trigger
'
)
);
router
.
push
(
'
/exception/trigger
'
);
return
;
}
if
(
key
===
'
userinfo
'
)
{
dispatch
(
routerRedux
.
push
(
'
/account/settings/base
'
)
);
router
.
push
(
'
/account/settings/base
'
);
return
;
}
if
(
key
===
'
logout
'
)
{
...
...
src/layouts/PageHeaderLayout.js
View file @
24e9ab7f
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
PageHeader
from
'
@/components/PageHeader
'
;
import
GridContent
from
'
./GridContent
'
;
import
styles
from
'
./PageHeaderLayout.less
'
;
...
...
src/layouts/UserLayout.js
View file @
24e9ab7f
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
{
Icon
}
from
'
antd
'
;
import
GlobalFooter
from
'
@/components/GlobalFooter
'
;
import
styles
from
'
./UserLayout.less
'
;
...
...
src/pages/404.js
View file @
24e9ab7f
import
React
from
'
react
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Exception
from
'
@/components/Exception
'
;
export
default
()
=>
(
...
...
src/pages/Account/Center/Center.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
,
routerRedux
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
router
from
'
umi/router
'
;
import
{
Card
,
Row
,
Col
,
Icon
,
Avatar
,
Tag
,
Divider
,
Spin
,
Input
}
from
'
antd
'
;
import
GridContent
from
'
@/layouts/GridContent
'
;
import
styles
from
'
./Center.less
'
;
...
...
@@ -36,16 +37,16 @@ export default class Center extends PureComponent {
}
onTabChange
=
key
=>
{
const
{
dispatch
,
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
;
switch
(
key
)
{
case
'
articles
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/articles`
)
);
router
.
push
(
`
${
match
.
url
}
/articles`
);
break
;
case
'
applications
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/applications`
)
);
router
.
push
(
`
${
match
.
url
}
/applications`
);
break
;
case
'
projects
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/projects`
)
);
router
.
push
(
`
${
match
.
url
}
/projects`
);
break
;
default
:
break
;
...
...
src/pages/Account/Settings/Info.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
Menu
}
from
'
antd
'
;
import
styles
from
'
./Info.less
'
;
...
...
@@ -71,8 +71,7 @@ export default class Info extends Component {
};
selectKey
=
({
key
})
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
(
routerRedux
.
push
(
`/account/settings/
${
key
}
`
));
router
.
push
(
`/account/settings/
${
key
}
`
);
this
.
setState
({
selectKey
:
key
,
});
...
...
src/pages/Dashboard/Workplace.js
View file @
24e9ab7f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
{
Row
,
Col
,
Card
,
List
,
Avatar
}
from
'
antd
'
;
import
{
Radar
}
from
'
@/components/Charts
'
;
...
...
src/pages/Exception/403.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Exception
from
'
@/components/Exception
'
;
class
Exception403
extends
Component
{
...
...
src/pages/Exception/404.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Exception
from
'
@/components/Exception
'
;
class
Exception404
extends
Component
{
...
...
src/pages/Exception/500.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Exception
from
'
@/components/Exception
'
;
class
Exception500
extends
Component
{
...
...
src/pages/Forms/StepForm/Step1.js
View file @
24e9ab7f
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Form
,
Input
,
Button
,
Select
,
Divider
}
from
'
antd
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
styles
from
'
./style.less
'
;
const
{
Option
}
=
Select
;
...
...
@@ -30,7 +30,7 @@ export default class Step1 extends React.PureComponent {
type
:
'
form/saveStepFormData
'
,
payload
:
values
,
});
dispatch
(
routerRedux
.
push
(
'
/form/step-form/confirm
'
)
);
router
.
push
(
'
/form/step-form/confirm
'
);
}
});
};
...
...
src/pages/Forms/StepForm/Step2.js
View file @
24e9ab7f
import
React
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Form
,
Input
,
Button
,
Alert
,
Divider
}
from
'
antd
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
{
digitUppercase
}
from
'
@/utils/utils
'
;
import
styles
from
'
./style.less
'
;
...
...
@@ -20,7 +20,7 @@ class Step2 extends React.PureComponent {
const
{
form
,
data
,
dispatch
,
submitting
}
=
this
.
props
;
const
{
getFieldDecorator
,
validateFields
}
=
form
;
const
onPrev
=
()
=>
{
dispatch
(
routerRedux
.
push
(
'
/form/step-form/info
'
)
);
router
.
push
(
'
/form/step-form/info
'
);
};
const
onValidateForm
=
e
=>
{
e
.
preventDefault
();
...
...
src/pages/Forms/StepForm/Step3.js
View file @
24e9ab7f
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Button
,
Row
,
Col
}
from
'
antd
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
Result
from
'
@/components/Result
'
;
import
styles
from
'
./style.less
'
;
...
...
@@ -10,9 +10,9 @@ import styles from './style.less';
}))
export
default
class
Step3
extends
React
.
PureComponent
{
render
()
{
const
{
d
ispatch
,
d
ata
}
=
this
.
props
;
const
{
data
}
=
this
.
props
;
const
onFinish
=
()
=>
{
dispatch
(
routerRedux
.
push
(
'
/form/step-form/info
'
)
);
router
.
push
(
'
/form/step-form/info
'
);
};
const
information
=
(
<
div
className
=
{
styles
.
information
}
>
...
...
src/pages/List/List.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
routerRedux
}
from
'
dva
/router
'
;
import
router
from
'
umi
/router
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Input
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
@/layouts/PageHeaderLayout
'
;
...
...
@@ -7,16 +7,16 @@ import PageHeaderLayout from '@/layouts/PageHeaderLayout';
@
connect
()
export
default
class
SearchList
extends
Component
{
handleTabChange
=
key
=>
{
const
{
dispatch
,
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
;
switch
(
key
)
{
case
'
articles
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/articles`
)
);
router
.
push
(
`
${
match
.
url
}
/articles`
);
break
;
case
'
applications
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/applications`
)
);
router
.
push
(
`
${
match
.
url
}
/applications`
);
break
;
case
'
projects
'
:
dispatch
(
routerRedux
.
push
(
`
${
match
.
url
}
/projects`
)
);
router
.
push
(
`
${
match
.
url
}
/projects`
);
break
;
default
:
break
;
...
...
src/pages/User/Login.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
{
Checkbox
,
Alert
,
Icon
}
from
'
antd
'
;
import
Login
from
'
@/components/Login
'
;
import
styles
from
'
./Login.less
'
;
...
...
src/pages/User/Register.js
View file @
24e9ab7f
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
,
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
router
from
'
umi/router
'
;
import
{
Form
,
Input
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Progress
}
from
'
antd
'
;
import
styles
from
'
./Register.less
'
;
...
...
@@ -39,7 +40,7 @@ export default class Register extends Component {
const
account
=
form
.
getFieldValue
(
'
mail
'
);
if
(
register
.
status
===
'
ok
'
)
{
dispatch
(
router
Redux
.
push
({
router
.
push
({
pathname
:
'
/user/register-result
'
,
state
:
{
account
,
...
...
src/pages/User/RegisterResult.js
View file @
24e9ab7f
import
React
from
'
react
'
;
import
{
Button
}
from
'
antd
'
;
import
{
Link
}
from
'
dva/router
'
;
import
Link
from
'
umi/link
'
;
import
Result
from
'
@/components/Result
'
;
import
styles
from
'
./RegisterResult.less
'
;
...
...
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