dev_hss
hjm 6 years ago
parent c088429579
commit 7559b34226

@ -100,6 +100,7 @@ class NewWorkForm extends Component{
const courseId = this.state.course_id || this.props.match.params.coursesId ; const courseId = this.state.course_id || this.props.match.params.coursesId ;
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if(err && err.personNum) delete err.personNum;
console.log(values) console.log(values)
const mdContnet = this.contentMdRef.current.getValue().trim(); const mdContnet = this.contentMdRef.current.getValue().trim();
console.log(mdContnet) console.log(mdContnet)
@ -135,7 +136,7 @@ class NewWorkForm extends Component{
} }
// const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet // const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet
if (!err) { if (!err || Object.keys(err).length == 0) {
if (this.state.isEdit) { if (this.state.isEdit) {
this.doEdit(courseId, values) this.doEdit(courseId, values)
} else { } else {
@ -451,12 +452,12 @@ class NewWorkForm extends Component{
> >
{getFieldDecorator('personNum', { {getFieldDecorator('personNum', {
validateTrigger: 'onNone', validateTrigger: 'onNone',
rules: [{ // rules: [{
// required: true, // required: true,
// message: '人数不能为空' // message: '人数不能为空'
// validator: this.personNumValidator // validator: this.personNumValidator
// required: true, message: '请输入最小人数和最大人数' // required: true, message: '请输入最小人数和最大人数'
}], // }],
})( })(
<div> <div>
<p className="clearfix"> <p className="clearfix">

Loading…
Cancel
Save