File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Test extends React.Component {
23
23
24
24
onVcode2Change ( v ) {
25
25
console . log ( '触发回调onChange' , v ) ;
26
- if ( v ) {
26
+ if ( v ) {
27
27
this . setState ( {
28
28
vcode2 : v ,
29
29
} ) ;
@@ -35,7 +35,7 @@ class Test extends React.Component {
35
35
this . setState ( {
36
36
img : imgindex ,
37
37
code : imgindex === 1 ? ImgTest1 : ImgTest2 ,
38
- vcode2 : '1234'
38
+ vcode2 : '1234' ,
39
39
} ) ;
40
40
}
41
41
onChangeStr ( ) {
@@ -53,19 +53,19 @@ class Test extends React.Component {
53
53
onVcodeClick ( ) {
54
54
this . onChangeStr ( ) ;
55
55
}
56
- onChangeWidth ( ) {
56
+ onChangeWidth ( ) {
57
57
const l = Math . round ( Math . random ( ) * 800 + 400 ) ;
58
58
console . log ( '改变width:' , l ) ;
59
59
this . setState ( {
60
- width : l
60
+ width : l ,
61
61
} ) ;
62
62
}
63
63
render ( ) {
64
64
return (
65
65
< div >
66
66
< div >
67
67
< input type = "text" placeholder = "请输入正确的验证码" value = { this . state . input2 } onChange = { e => this . onInput2Change ( e ) } maxLength = { 20 } />
68
- < Vcode onChange = { ( v ) => this . onVcode2Change ( v ) } value = { this . state . code } width = { this . state . width } />
68
+ < Vcode onChange = { v => this . onVcode2Change ( v ) } value = { this . state . code } width = { this . state . width } />
69
69
< span > { this . state . input2 === this . state . vcode2 ? '输入正确' : '输入错误' } </ span >
70
70
</ div >
71
71
< hr />
You can’t perform that action at this time.
0 commit comments