-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(modal): when title large hidden close icon (#535)
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
order: 6 | ||
title: | ||
zh-CN: 超长 Title | ||
--- | ||
|
||
## zh-CN | ||
|
||
弹框中包含表格 | ||
|
||
```jsx | ||
import { Modal, Button, Table } from 'antd'; | ||
|
||
class App extends React.Component { | ||
state = { visible: false }; | ||
|
||
showModal = () => { | ||
this.setState({ | ||
visible: true, | ||
}); | ||
}; | ||
|
||
handleOk = e => { | ||
console.log(e); | ||
this.setState({ | ||
visible: false, | ||
}); | ||
}; | ||
|
||
handleCancel = e => { | ||
console.log(e); | ||
this.setState({ | ||
visible: false, | ||
}); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Button type="primary" onClick={this.showModal}> | ||
Open Modal | ||
</Button> | ||
<Modal | ||
title="xixiixixixixiixxixiix超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻" | ||
width={520} | ||
visible={this.state.visible} | ||
onOk={this.handleOk} | ||
onCancel={this.handleCancel} | ||
> | ||
内容 | ||
</Modal> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
ReactDOM.render(<App />, mountNode); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@import "../const.less"; | ||
|
||
.ant-modal-title { | ||
padding-right: 10px; | ||
font-weight: 600; | ||
} | ||
|
||
|