关于componentWillReceiveProps的使用
componentWillReceiveProps(nextProps) {
const {state,props} = this
if (nextProps.formList.length && !this.state.formId) {
this.setState({ formId: nextProps.formList[0].formOriginId });
}
props.getFormTemplate({
formId: nextProps.formList[0].formOriginId
})
}