Skip to content

Commit 509b63e

Browse files
committed
up
1 parent ceb6f6c commit 509b63e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example/src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Test extends React.Component {
2323

2424
onVcode2Change(v) {
2525
console.log('触发回调onChange', v);
26-
if(v){
26+
if (v) {
2727
this.setState({
2828
vcode2: v,
2929
});
@@ -35,7 +35,7 @@ class Test extends React.Component {
3535
this.setState({
3636
img: imgindex,
3737
code: imgindex === 1 ? ImgTest1 : ImgTest2,
38-
vcode2: '1234'
38+
vcode2: '1234',
3939
});
4040
}
4141
onChangeStr() {
@@ -53,19 +53,19 @@ class Test extends React.Component {
5353
onVcodeClick() {
5454
this.onChangeStr();
5555
}
56-
onChangeWidth(){
56+
onChangeWidth() {
5757
const l = Math.round(Math.random() * 800 + 400);
5858
console.log('改变width:', l);
5959
this.setState({
60-
width: l
60+
width: l,
6161
});
6262
}
6363
render() {
6464
return (
6565
<div>
6666
<div>
6767
<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} />
6969
<span>{this.state.input2 === this.state.vcode2 ? '输入正确' : '输入错误'}</span>
7070
</div>
7171
<hr />

0 commit comments

Comments
 (0)