dev_aliyun_beta
hjm 6 years ago
parent ac747d3b9d
commit 8ed3137615

@ -68,6 +68,9 @@ class NewWork extends Component{
console.log(error);
});
}
onCancel = () => {
this.props.toListPage(this.props.match.params, category.category_id)
}
doEdit = (params) => {
const workId = this.props.match.params.workId
@ -140,7 +143,7 @@ class NewWork extends Component{
<div>
<NewWorkForm wrappedComponentRef={(ref) => {this.newWorkFormRef = ref}}
{...this.props}
onSave={this.onSave}
onCancel={this.onCancel}
doNew={this.doNew}
doEdit={this.doEdit}
></NewWorkForm>

@ -10,6 +10,11 @@ import CBreadcrumb from '../common/CBreadcrumb'
const confirm = Modal.confirm;
const $ = window.$
const MAX_TITLE_LENGTH = 60;
/**
需要注意的props
isGroup
*/
class NewWorkForm extends Component{
constructor(props){
super(props);
@ -453,7 +458,7 @@ class NewWorkForm extends Component{
<div className="clearfix mt30 mb30">
{/* htmlType="submit" */}
<Button type="primary" onClick={this.handleSubmit} className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl" onClick={() => this.props.toListPage(this.props.match.params, category.category_id)}>取消</ a>
<a className="defalutCancelbtn fl" onClick={() => this.props.onCancel()}>取消</ a>
</div>
</Form.Item>
</Form>

Loading…
Cancel
Save