选题新建

dev_forum
caishi 6 years ago
parent 47ba7cb333
commit ee6d0ee4ae

@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{
topic_source:[], topic_source:[],
topic_type:[], topic_type:[],
attachments:undefined, attachments:undefined,
addonAfter:20, addonAfter:60,
left_banner_id:undefined, left_banner_id:undefined,
course_name:undefined course_name:undefined
} }
@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{
// 附件相关 ------------ END // 附件相关 ------------ END
changeTopicName=(e)=>{ changeTopicName=(e)=>{
let num= 20 - parseInt(e.target.value.length); let num= 60 - parseInt(e.target.value.length);
this.setState({ this.setState({
addonAfter:num < 0 ? 0 : num addonAfter:num < 0 ? 0 : num
}) })
@ -357,10 +357,10 @@ class GraduateTopicNew extends Component{
rules: [{ rules: [{
required: true, message: '请输入选题名称', required: true, message: '请输入选题名称',
}, { }, {
max: 20, message: '最大限制为20个字符', max: 60, message: '最大限制为60个字符',
}], }],
})( })(
<Input placeholder="请输入帖子选题名称,最大限制20个字符" maxLength="20" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" /> <Input placeholder="请输入帖子选题名称,最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
)} )}
</Form.Item> </Form.Item>
</div> </div>
@ -381,6 +381,9 @@ class GraduateTopicNew extends Component{
width: 350px; width: 350px;
margin-bottom:10px; margin-bottom:10px;
} }
.ant-upload-list-item{
margin-top:0px!important;
}
`}</style> `}</style>

Loading…
Cancel
Save