|
|
@ -16,8 +16,8 @@ var Test = React.createClass({ |
|
|
|
visible: false |
|
|
|
}; |
|
|
|
}, |
|
|
|
showModal() { |
|
|
|
this.setState({ visible: true }); |
|
|
|
showModal(e) { |
|
|
|
this.setState({ visible: true,mousePosition:{x:e.pageX,y:e.pageY} }); |
|
|
|
}, |
|
|
|
handleOk() { |
|
|
|
this.setState({ loading: true }); |
|
|
@ -35,6 +35,7 @@ var Test = React.createClass({ |
|
|
|
</button> |
|
|
|
<Modal ref="modal" |
|
|
|
visible={this.state.visible} |
|
|
|
mousePosition={this.state.mousePosition} |
|
|
|
title="对话框标题" onOk={this.handleOk} onCancel={this.handleCancel} |
|
|
|
footer={[ |
|
|
|
<button key="back" className="ant-btn ant-btn-lg" onClick={this.handleCancel}>返 回</button>, |
|
|
|