update 完成表单中上传控件的使用

This commit is contained in:
2021-06-22 11:00:21 +08:00
parent f31f79d59d
commit f05f476789
17 changed files with 883 additions and 106 deletions

View File

@@ -36,17 +36,22 @@ export default class part extends Component {
}
/**
* DOM加载完成钩子,在此将自身传递给父级,并且绑定数据
* DOM加载完成钩子,绑定数据
*/
componentDidMount() {
if (this.props.onRef) {
this.props.onRef(this)
}
this.fillData({
record: this.props.record,
})
}
/**
* 加载完成,通知父级组件并传递自身
*/
call() {
const { onRef } = this.props
if (onRef) onRef(this)
}
/**
* 填充数据
* 可以在设置this.record之后对其作出数据结构调整
@@ -59,9 +64,8 @@ export default class part extends Component {
//#endregion
this.form.current.setFieldsValue(this.record)
this.setState({
loading: false,
})
this.setState({ loading: false })
this.call()
}
/**