this.props.handleSetModalVisiable({visible: true, mode: type});
和Form.create({})(CreateScreen)
是什么意思?
handleSetModalVisiable 的函数体无法找到
Form.create({})() 这种形式怎么理解?
showModal(e, item, type) {
e.stopPropagation();
e.preventDefault();
//设置展示
this.props.handleSetModalVisiable({visible: true, mode: type});
}
handleCancel() {
let self = this;
//清空form
self.props.form.resetFields();
//关闭modal
self.props.handleSetModalVisiable({visible: false});
}
import { Modal, Button, Form, Input, Row, Col } from 'antd';
export default Form.create({})(CreateScreen);
Form.create({})()
返回的是一个包装后的组件,Form是一个高阶组件,具体你可以看一下高阶组件this.props.handleSetModalVisiable()
是调用父组件的方法至于你说函数体找不到?我就不太理解了