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
cf1553fb
Commit
cf1553fb
authored
Apr 16, 2019
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Result finish
parent
0b1b1122
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
229 additions
and
25 deletions
+229
-25
ResultFail/src/Result/index.less
ResultFail/src/Result/index.less
+58
-0
ResultFail/src/Result/index.tsx
ResultFail/src/Result/index.tsx
+41
-0
ResultFail/src/index.tsx
ResultFail/src/index.tsx
+15
-12
ResultFail/src/locales/en-US.ts
ResultFail/src/locales/en-US.ts
+0
-0
ResultFail/src/locales/zh-CN.ts
ResultFail/src/locales/zh-CN.ts
+0
-0
ResultFail/src/locales/zh-TW.ts
ResultFail/src/locales/zh-TW.ts
+0
-0
ResultSuccess/src/Result/index.less
ResultSuccess/src/Result/index.less
+58
-0
ResultSuccess/src/Result/index.tsx
ResultSuccess/src/Result/index.tsx
+41
-0
ResultSuccess/src/index.tsx
ResultSuccess/src/index.tsx
+15
-12
ResultSuccess/src/locales/en-US.ts
ResultSuccess/src/locales/en-US.ts
+0
-0
ResultSuccess/src/locales/zh-CN.ts
ResultSuccess/src/locales/zh-CN.ts
+0
-0
ResultSuccess/src/locales/zh-TW.ts
ResultSuccess/src/locales/zh-TW.ts
+0
-0
package.json
package.json
+1
-1
No files found.
ResultFail/src/Result/index.less
0 → 100644
View file @
cf1553fb
@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;
}
}
}
ResultFail/src/Result/index.tsx
0 → 100644
View file @
cf1553fb
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
;
ResultFail/src/index.
js
→
ResultFail/src/index.
tsx
View file @
cf1553fb
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
Button
,
Icon
,
Card
}
from
'
antd
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
import
Result
from
'
./Result
'
;
import
{
GridContent
}
from
'
@ant-design/pro-layout
'
;
const
extra
=
(
<
Fragment
>
...
...
@@ -9,7 +10,7 @@ const extra = (
style
=
{
{
fontSize
:
16
,
color
:
'
rgba(0, 0, 0, 0.85)
'
,
fontWeight
:
'
500
'
,
fontWeight
:
500
,
marginBottom
:
16
,
}
}
>
...
...
@@ -50,6 +51,7 @@ const actions = (
);
export
default
()
=>
(
<
GridContent
>
<
Card
bordered
=
{
false
}
>
<
Result
type
=
"error"
...
...
@@ -60,4 +62,5 @@ export default () => (
style
=
{
{
marginTop
:
48
,
marginBottom
:
16
}
}
/>
</
Card
>
</
GridContent
>
);
ResultFail/src/locales/en-US.
j
s
→
ResultFail/src/locales/en-US.
t
s
View file @
cf1553fb
File moved
ResultFail/src/locales/zh-CN.
j
s
→
ResultFail/src/locales/zh-CN.
t
s
View file @
cf1553fb
File moved
ResultFail/src/locales/zh-TW.
j
s
→
ResultFail/src/locales/zh-TW.
t
s
View file @
cf1553fb
File moved
ResultSuccess/src/Result/index.less
0 → 100644
View file @
cf1553fb
@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;
}
}
}
ResultSuccess/src/Result/index.tsx
0 → 100644
View file @
cf1553fb
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
;
ResultSuccess/src/index.
js
→
ResultSuccess/src/index.
tsx
View file @
cf1553fb
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
Button
,
Row
,
Col
,
Icon
,
Steps
,
Card
}
from
'
antd
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
import
Result
from
'
./Result
'
;
import
{
GridContent
}
from
'
@ant-design/pro-layout
'
;
const
{
Step
}
=
Steps
;
...
...
@@ -43,7 +44,7 @@ const extra = (
style
=
{
{
fontSize
:
16
,
color
:
'
rgba(0, 0, 0, 0.85)
'
,
fontWeight
:
'
500
'
,
fontWeight
:
500
,
marginBottom
:
20
,
}
}
>
...
...
@@ -128,6 +129,7 @@ const actions = (
);
export
default
()
=>
(
<
GridContent
>
<
Card
bordered
=
{
false
}
>
<
Result
type
=
"success"
...
...
@@ -138,4 +140,5 @@ export default () => (
style
=
{
{
marginTop
:
48
,
marginBottom
:
16
}
}
/>
</
Card
>
</
GridContent
>
);
ResultSuccess/src/locales/en-US.
j
s
→
ResultSuccess/src/locales/en-US.
t
s
View file @
cf1553fb
File moved
ResultSuccess/src/locales/zh-CN.
j
s
→
ResultSuccess/src/locales/zh-CN.
t
s
View file @
cf1553fb
File moved
ResultSuccess/src/locales/zh-TW.
j
s
→
ResultSuccess/src/locales/zh-TW.
t
s
View file @
cf1553fb
File moved
package.json
View file @
cf1553fb
{
"private"
:
true
,
"scripts"
:
{
"dev"
:
"cross-env PAGES_PATH='
Monitor
/src' umi dev"
,
"dev"
:
"cross-env PAGES_PATH='
ResultFail
/src' umi dev"
,
"lint:style"
:
"stylelint
\"
src/**/*.less
\"
--syntax less"
,
"lint"
:
"eslint --ext .js src mock tests && npm run lint:style"
,
"lint:fix"
:
"eslint --fix --ext .js src mock tests && npm run lint:style"
,
...
...
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