2
2
category : Components
3
3
type : Feedback
4
4
title : Drawer
5
- cover : https://img.alicdn .com/imgextra/i4/O1CN019djdZP1OHwXSRGCOW_!!6000000001681-55-tps-161-117.svg
5
+ cover : https://mdn.alipayobjects .com/huamei_7uahnr/afts/img/A*v3TvSq2E0HAAAAAAAAAAAAAADrJ8AQ/original
6
6
---
7
7
8
8
A panel which slides in from the edge of the screen.
@@ -17,16 +17,17 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
17
17
18
18
## API
19
19
20
+ ** 🚨 Note:** v4 use ` rootClassName ` & ` rootStyle ` to config wrapper style instead of ` class ` & ` style ` in v4 to align the API with Modal.
21
+
20
22
| Props | Description | Type | Default | Version |
21
23
| --- | --- | --- | --- | --- |
22
24
| autofocus | Whether Drawer should get focused after open | boolean | true | 3.0.0 |
23
25
| bodyStyle | Style of the drawer content part | CSSProperties | - | |
24
- | class | The class name of the container of the Drawer dialog | string | - | |
26
+ | class | Config Drawer Panel className. Use ` rootClassName ` if want to config top dom style | string | - | |
25
27
| closable | Whether a close (x) button is visible on top left of the Drawer dialog or not | boolean | true | |
26
28
| closeIcon | Custom close icon | VNode \| slot | ` <CloseOutlined /> ` | 3.0.0 |
27
29
| contentWrapperStyle | Style of the drawer wrapper of content part | CSSProperties | - | 3.0.0 |
28
30
| destroyOnClose | Whether to unmount child components on closing drawer or not | boolean | false | |
29
- | drawerStyle | Style of the popup layer element | CSSProperties | - | |
30
31
| extra | Extra actions area at corner | VNode \| slot | - | 3.0.0 |
31
32
| footer | The footer for Drawer | VNode \| slot | - | 3.0.0 |
32
33
| footerStyle | Style of the drawer footer part | CSSProperties | - | 3.0.0 |
@@ -40,16 +41,19 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
40
41
| maskStyle | Style for Drawer's mask element | CSSProperties | {} | |
41
42
| placement | The placement of the Drawer | 'top' \| 'right' \| 'bottom' \| 'left' | 'right' | |
42
43
| push | Nested drawers push behavior | boolean \| {distance: string \| number} | { distance: 180 } | 3.0.0 |
44
+ | rootClassName | The class name of the container of the Drawer dialog | string | - | 4.0 |
45
+ | rootStyle | Style of wrapper element which ** contains mask** compare to ` style ` | CSSProperties | - | 4.0 |
46
+ | style | Style of Drawer panel. Use ` bodyStyle ` if want to config body only | CSSProperties | - | |
43
47
| size | presetted size of drawer, default ` 378px ` and large ` 736px ` | ` default ` \| ` large ` | ` default ` | 3.0.0 |
44
48
| style | Style of wrapper element which contains mask compare to drawerStyle | CSSProperties | - | |
45
49
| title | The title for Drawer | string \| slot | - | |
46
- | visible (v-model) | Whether the Drawer dialog is visible or not | boolean | - | |
50
+ | open (v-model) | Whether the Drawer dialog is visible or not | boolean | - | 4.0 |
47
51
| width | Width of the Drawer dialog | string \| number | 378 | |
48
52
| zIndex | The ` z-index ` of the Drawer | Number | 1000 | |
49
53
50
54
## Events
51
55
52
56
| Name | Description | Type | Default | Version |
53
57
| --- | --- | --- | --- | --- |
54
- | afterVisibleChange | Callback after the animation ends when switching drawers. | function(visible ) | - | |
58
+ | afterOpenChange | Callback after the animation ends when switching drawers. | function(open ) | - | 4.0 |
55
59
| close | Specify a callback that will be called when a user clicks mask, close button or Cancel button. | function(e) | - | |
0 commit comments