Browse Source

update modal basic demo

pull/344/head
afc163 9 years ago
parent
commit
176adab763
  1. 17
      components/modal/demo/basic.md

17
components/modal/demo/basic.md

@ -9,11 +9,9 @@
````jsx ````jsx
var Modal = antd.Modal; var Modal = antd.Modal;
var Test = React.createClass({ var App = React.createClass({
getInitialState(){ getInitialState() {
return{ return { visible: false };
visible: false
};
}, },
showModal() { showModal() {
this.setState({ this.setState({
@ -35,11 +33,8 @@ var Test = React.createClass({
render() { render() {
return <div> return <div>
<button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button> <button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button>
<Modal title="第一个 Modal" <Modal title="第一个 Modal" visible={this.state.visible}
visible={this.state.visible} confirmLoading={this.state.confirmLoading} onOk={this.handleOk} onCancel={this.handleCancel}>
confirmLoading={this.state.confirmLoading}
onOk={this.handleOk}
onCancel={this.handleCancel}>
<p>对话框的内容</p> <p>对话框的内容</p>
<p>对话框的内容</p> <p>对话框的内容</p>
<p>对话框的内容</p> <p>对话框的内容</p>
@ -48,5 +43,5 @@ var Test = React.createClass({
} }
}); });
React.render(<Test/> , document.getElementById('components-modal-demo-basic')); React.render(<App /> , document.getElementById('components-modal-demo-basic'));
```` ````

Loading…
Cancel
Save