Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
杨树明 5 years ago
commit 0b4fce28f0

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

@ -6,6 +6,7 @@ class Addshixuns extends Component {
super(props);
this.state = {
shixunname:undefined,
shixunzero:false
}
}
@ -13,8 +14,15 @@ class Addshixuns extends Component {
this.setState({
shixunname:e.target.value,
})
if(e.target.value.length>0){
this.setState({
shixunzero:false
})
}
}
modalCancel=()=>{
this.setState({
shixunname:undefined,
@ -24,6 +32,12 @@ class Addshixuns extends Component {
modalSave=()=>{
let {shixunname}=this.state;
if(shixunname===undefined||shixunname.length===0){
this.setState({
shixunzero:true
})
return
}
this.props.Setaddshixuns(shixunname);
this.props.modalCancel();
}
@ -58,6 +72,7 @@ class Addshixuns extends Component {
<span><Input style={{ width:"80%"}} className="yslzxueshisy " placeholder="请输入60字以内的实训名称" onChange={this.handleChange} addonAfter={String(this.state.shixunname===undefined?0:this.state.shixunname.length)+"/60"} maxLength={60} />
</span>
</p>
{this.state.shixunzero===true?<p className={"color-red ml85"}>请输入实训名称</p>:""}
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 colorFFF" onClick={this.modalCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.modalSave}>确定</a>

Loading…
Cancel
Save