当需要三个按钮时,写个组件
footer={buttons}
<Modal
width="400px"
title="选择外包服务"
visible={this.state.visible3}
footer={buttons}
maskClosable={false}
destroyOnClose={true}
closable={false}
forceRender={true}
>
<ServiceSource
loading={this.state.loading}
ref="children"
service={this.service}
qd={this.qd}
getFieldDecorator={getFieldDecorator}
serviceNamelist={this.state.serviceNamelist}
serviceId={this.state.serviceId}
/>
</Modal>
let buttons = [];
buttons = [
<Button type="primary" onClick={this.quxiao} key="test">
取消
</Button>,
<Button type="primary" onClick={this.qd}>
确定
</Button>,
<Button type="primary" onClick={this.xj}>
新建外包服务
</Button>
]