this._scrollToTop()

dev_cs
hjm 6 years ago
parent 68b3c68c9d
commit f0391bb23c

@ -73,7 +73,6 @@ class NewWorkForm extends Component{
setTimeout(() => { setTimeout(() => {
this.contentMdRef.current.setValue(data.description || '') this.contentMdRef.current.setValue(data.description || '')
this.answerMdRef.current.setValue(data.reference_answer || '') this.answerMdRef.current.setValue(data.reference_answer || '')
}, 2000) }, 2000)
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -86,8 +85,13 @@ class NewWorkForm extends Component{
} else { // new } else { // new
} }
this._scrollToTop()
}
_scrollToTop = () => {
setTimeout(() => {
$("html").animate({ scrollTop: 0 })
}, 1500)
} }
// 输入title // 输入title
changeTitle=(e)=>{ changeTitle=(e)=>{
@ -289,6 +293,7 @@ class NewWorkForm extends Component{
} }
componentDidMount() { componentDidMount() {
window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required') window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required')
this._scrollToTop()
} }
render(){ render(){

Loading…
Cancel
Save