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
40ac8b52
Commit
40ac8b52
authored
Apr 19, 2019
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UserRegisterResult finish
parent
cbe854a6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
2 deletions
+102
-2
UserRegisterResult/src/Result/index.less
UserRegisterResult/src/Result/index.less
+58
-0
UserRegisterResult/src/Result/index.tsx
UserRegisterResult/src/Result/index.tsx
+41
-0
UserRegisterResult/src/index.tsx
UserRegisterResult/src/index.tsx
+3
-2
UserRegisterResult/src/locales/en-US.ts
UserRegisterResult/src/locales/en-US.ts
+0
-0
UserRegisterResult/src/locales/zh-CN.ts
UserRegisterResult/src/locales/zh-CN.ts
+0
-0
UserRegisterResult/src/locales/zh-TW.ts
UserRegisterResult/src/locales/zh-TW.ts
+0
-0
No files found.
UserRegisterResult/src/Result/index.less
0 → 100644
View file @
40ac8b52
@import '~antd/lib/style/themes/default.less';
.result {
width: 72%;
margin: 0 auto;
text-align: center;
@media screen and (max-width: @screen-xs) {
width: 100%;
}
.icon {
margin-bottom: 24px;
font-size: 72px;
line-height: 72px;
& > .success {
color: @success-color;
}
& > .error {
color: @error-color;
}
}
.title {
margin-bottom: 16px;
color: @heading-color;
font-weight: 500;
font-size: 24px;
line-height: 32px;
}
.description {
margin-bottom: 24px;
color: @text-color-secondary;
font-size: 14px;
line-height: 22px;
}
.extra {
padding: 24px 40px;
text-align: left;
background: #fafafa;
border-radius: @border-radius-sm;
@media screen and (max-width: @screen-xs) {
padding: 18px 20px;
}
}
.actions {
margin-top: 32px;
button:not(:last-child) {
margin-right: 8px;
}
}
}
UserRegisterResult/src/Result/index.tsx
0 → 100644
View file @
40ac8b52
import
React
from
'
react
'
;
import
classNames
from
'
classnames
'
;
import
{
Icon
}
from
'
antd
'
;
import
styles
from
'
./index.less
'
;
export
interface
ResultProps
{
actions
?:
React
.
ReactNode
;
className
?:
string
;
description
?:
React
.
ReactNode
;
extra
?:
React
.
ReactNode
;
style
?:
React
.
CSSProperties
;
title
?:
React
.
ReactNode
;
type
:
'
success
'
|
'
error
'
;
}
const
Result
:
React
.
SFC
<
ResultProps
>
=
({
className
,
type
,
title
,
description
,
extra
,
actions
,
...
restProps
})
=>
{
const
iconMap
=
{
error
:
<
Icon
className
=
{
styles
.
error
}
type
=
"close-circle"
theme
=
"filled"
/>,
success
:
<
Icon
className
=
{
styles
.
success
}
type
=
"check-circle"
theme
=
"filled"
/>,
};
const
clsString
=
classNames
(
styles
.
result
,
className
);
return
(
<
div
className
=
{
clsString
}
{
...
restProps
}
>
<
div
className
=
{
styles
.
icon
}
>
{
iconMap
[
type
]
}
</
div
>
<
div
className
=
{
styles
.
title
}
>
{
title
}
</
div
>
{
description
&&
<
div
className
=
{
styles
.
description
}
>
{
description
}
</
div
>
}
{
extra
&&
<
div
className
=
{
styles
.
extra
}
>
{
extra
}
</
div
>
}
{
actions
&&
<
div
className
=
{
styles
.
actions
}
>
{
actions
}
</
div
>
}
</
div
>
);
};
export
default
Result
;
UserRegisterResult/src/index.
js
→
UserRegisterResult/src/index.
tsx
View file @
40ac8b52
...
@@ -2,8 +2,9 @@ import React from 'react';
...
@@ -2,8 +2,9 @@ import React from 'react';
import
{
formatMessage
,
FormattedMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
Button
}
from
'
antd
'
;
import
{
Button
}
from
'
antd
'
;
import
Link
from
'
umi/link
'
;
import
Link
from
'
umi/link
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
import
Result
from
'
./Result
'
;
import
styles
from
'
./style.less
'
;
import
styles
from
'
./style.less
'
;
import
{
RouteChildrenProps
}
from
'
react-router
'
;
const
actions
=
(
const
actions
=
(
<
div
className
=
{
styles
.
actions
}
>
<
div
className
=
{
styles
.
actions
}
>
...
@@ -20,7 +21,7 @@ const actions = (
...
@@ -20,7 +21,7 @@ const actions = (
</
div
>
</
div
>
);
);
const
PAGE_NAME_UPPER_CAMEL_CASE
=
({
location
})
=>
(
const
PAGE_NAME_UPPER_CAMEL_CASE
:
React
.
SFC
<
RouteChildrenProps
>
=
({
location
})
=>
(
<
Result
<
Result
className
=
{
styles
.
registerResult
}
className
=
{
styles
.
registerResult
}
type
=
"success"
type
=
"success"
...
...
UserRegisterResult/src/locales/en-US.
j
s
→
UserRegisterResult/src/locales/en-US.
t
s
View file @
40ac8b52
File moved
UserRegisterResult/src/locales/zh-CN.
j
s
→
UserRegisterResult/src/locales/zh-CN.
t
s
View file @
40ac8b52
File moved
UserRegisterResult/src/locales/zh-TW.
j
s
→
UserRegisterResult/src/locales/zh-TW.
t
s
View file @
40ac8b52
File moved
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