File tree 3 files changed +21
-19
lines changed 3 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,23 @@ import React from "react";
3
3
export default function ErrorList ( props ) {
4
4
const { errors } = props ;
5
5
return (
6
- < div className = "panel panel-danger errors" >
7
- < div className = "panel-heading" >
8
- < h3 className = "panel-title" > Errors</ h3 >
6
+ < div className = "ant-card ant-card-bordered" >
7
+ < div className = "ant-card-head" >
8
+ < div className = "ant-card-head-wrapper" >
9
+ < div className = "ant-card-head-title" > 错误列表</ div >
10
+ </ div >
11
+ </ div >
12
+ < div className = "ant-card-body" >
13
+ < ul >
14
+ { errors . map ( ( error , i ) => {
15
+ return (
16
+ < li key = { i } className = "has-error" >
17
+ { error . stack }
18
+ </ li >
19
+ ) ;
20
+ } ) }
21
+ </ ul >
9
22
</ div >
10
- < ul className = "list-group" >
11
- { errors . map ( ( error , i ) => {
12
- return (
13
- < li key = { i } className = "list-group-item text-danger" >
14
- { error . stack }
15
- </ li >
16
- ) ;
17
- } ) }
18
- </ ul >
19
23
</ div >
20
24
) ;
21
25
}
Original file line number Diff line number Diff line change @@ -252,11 +252,11 @@ export default class Form extends Component {
252
252
{ children ? (
253
253
children
254
254
) : (
255
- < p >
255
+ < div style = { { paddingTop : "15px" } } >
256
256
< button type = "submit" className = "ant-btn ant-btn-primary" >
257
257
提交
258
258
</ button >
259
- </ p >
259
+ </ div >
260
260
) }
261
261
</ form >
262
262
) ;
Original file line number Diff line number Diff line change @@ -22,18 +22,16 @@ function CheckboxWidget(props) {
22
22
< label
23
23
className = { `ant-checkbox-wrapper ${
24
24
disabled || readonly ? "ant-checkbox-wrapper-disabled" : ""
25
- } ${
26
- typeof value === "undefined" ? "ant-checkbox-wrapper-checked" : ""
27
- } `} >
25
+ } ${ value ? "ant-checkbox-wrapper-checked" : "" } `} >
28
26
< span
29
27
className = { `ant-checkbox ${
30
28
disabled || readonly ? "ant-checkbox-disabled" : ""
31
- } ${ typeof value === "undefined" ? "ant-checkbox-checked" : "" } `} >
29
+ } ${ value ? "ant-checkbox-checked" : "" } `} >
32
30
< input
33
31
type = "checkbox"
34
32
className = "ant-checkbox-input"
35
33
id = { id }
36
- checked = { typeof value === "undefined" ? false : value }
34
+ checked = { value }
37
35
required = { required }
38
36
disabled = { disabled || readonly }
39
37
autoFocus = { autofocus }
You can’t perform that action at this time.
0 commit comments