Merge pull request #16228 from ant-design/drawer-afterVisibleChange

feat: Drawer after visible change
This commit is contained in:
偏右 2019-04-23 20:10:43 +08:00 committed by GitHub
commit b0f05094a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,7 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
| zIndex | The `z-index` of the Drawer. | Number | 1000 |
| placement | The placement of the Drawer. | 'top' \| 'right' \| 'bottom' \| 'left' | 'right' |
| onClose | Specify a callback that will be called when a user clicks mask, close button or Cancel button. | function(e) | - |
| afterVisibleChange | Callback after the animation ends when switching drawers. | function(visible) | - |
<style>
#_hj_feedback_container {

View File

@ -36,6 +36,7 @@ export interface DrawerProps {
push?: boolean;
placement?: placementType;
onClose?: (e: EventType) => void;
afterVisibleChange?: (visible: boolean) => void;
className?: string;
handler?: React.ReactNode;
}
@ -65,6 +66,7 @@ class Drawer extends React.Component<DrawerProps & ConfigConsumerProps, IDrawerS
prefixCls: PropTypes.string,
placement: PropTypes.oneOf(PlacementTypes),
onClose: PropTypes.func,
afterVisibleChange: PropTypes.func,
className: PropTypes.string,
};

View File

@ -34,6 +34,7 @@ title: Drawer
| zIndex | 设置 Drawer 的 `z-index` | Number | 1000 |
| placement | 抽屉的方向 | 'top' \| 'right' \| 'bottom' \| 'left' | 'right'
| onClose | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | 无 |
| afterVisibleChange | 切换抽屉时动画结束后的回调 | function(visible) | 无 |
<style>
#_hj_feedback_container {

View File

@ -66,7 +66,7 @@
"rc-checkbox": "~2.1.5",
"rc-collapse": "~1.11.1",
"rc-dialog": "~7.3.0",
"rc-drawer": "~1.7.6",
"rc-drawer": "~1.8.0",
"rc-dropdown": "~2.4.1",
"rc-editor-mention": "^1.1.7",
"rc-form": "^2.4.0",