在render函数中添加如下代码
// 禁用整个表单
if (activeData.isActive === 2) {
getFieldDecorator = (...rest) => {
return element => {
let NewElement = React.cloneElement(element, {
disabled: true
});
return this.props.form.getFieldDecorator(...rest)(NewElement);
};
};
}
网友评论