|
2 | 2 | // Definitions by: akki-jat <https://github.com/akki-jat>
|
3 | 3 | // Definitions: https://github.com/vueComponent/ant-design-vue/types
|
4 | 4 |
|
| 5 | +import { VNodeChild, CSSProperties } from 'vue'; |
5 | 6 | import { AntdComponent } from './component';
|
6 | 7 |
|
7 | 8 | export declare class Drawer extends AntdComponent {
|
8 |
| - /** |
9 |
| - * Whether a close (x) button is visible on top right of the Drawer dialog or not. |
10 |
| - * @default true |
11 |
| - * @type boolean |
12 |
| - */ |
13 |
| - closable: boolean; |
14 |
| - |
15 |
| - /** |
16 |
| - * Whether to unmount child components on closing drawer or not. |
17 |
| - * @default false |
18 |
| - * @type boolean |
19 |
| - */ |
20 |
| - destroyOnClose: boolean; |
21 |
| - |
22 |
| - /** |
23 |
| - * Return the mounted node for Drawer. |
24 |
| - * @default 'body' |
25 |
| - * @type any |
26 |
| - */ |
27 |
| - getContainer: any; |
28 |
| - |
29 |
| - /** |
30 |
| - * Whether to show mask or not. |
31 |
| - * @default true |
32 |
| - * @type boolean |
33 |
| - */ |
34 |
| - mask: boolean; |
35 |
| - |
36 |
| - /** |
37 |
| - * Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
38 |
| - * @default true |
39 |
| - * @type boolean |
40 |
| - */ |
41 |
| - maskClosable: boolean; |
42 |
| - |
43 |
| - /** |
44 |
| - * Style for Drawer's mask element. |
45 |
| - * @default {} |
46 |
| - * @type object |
47 |
| - */ |
48 |
| - maskStyle: object; |
49 |
| - |
50 |
| - /** |
51 |
| - * The title for Drawer. |
52 |
| - * @type any (string | slot) |
53 |
| - */ |
54 |
| - title: any; |
55 |
| - |
56 |
| - /** |
57 |
| - * Whether the Drawer dialog is visible or not. |
58 |
| - * @default false |
59 |
| - * @type boolean |
60 |
| - */ |
61 |
| - visible: boolean; |
62 |
| - |
63 |
| - /** |
64 |
| - * The class name of the container of the Drawer dialog. |
65 |
| - * @type string |
66 |
| - */ |
67 |
| - wrapClassName: string; |
68 |
| - |
69 |
| - /** |
70 |
| - * Style of wrapper element which **contains mask** compare to `drawerStyle` |
71 |
| - * @type object |
72 |
| - */ |
73 |
| - wrapStyle: object; |
74 |
| - |
75 |
| - /** |
76 |
| - * Style of the popup layer element |
77 |
| - * @type object |
78 |
| - */ |
79 |
| - drawerStyle: object; |
80 |
| - |
81 |
| - /** |
82 |
| - * Style of floating layer, typically used for adjusting its position. |
83 |
| - * @type object |
84 |
| - */ |
85 |
| - bodyStyle: object; |
86 |
| - headerStyle: object; |
87 |
| - /** |
88 |
| - * Width of the Drawer dialog. |
89 |
| - * @default 256 |
90 |
| - * @type string | number |
91 |
| - */ |
92 |
| - width: string | number; |
93 |
| - |
94 |
| - /** |
95 |
| - * placement is top or bottom, height of the Drawer dialog. |
96 |
| - * @type string | number |
97 |
| - */ |
98 |
| - height: string | number; |
99 |
| - |
100 |
| - /** |
101 |
| - * The z-index of the Drawer. |
102 |
| - * @default 1000 |
103 |
| - * @type number |
104 |
| - */ |
105 |
| - zIndex: number; |
106 |
| - |
107 |
| - /** |
108 |
| - * The placement of the Drawer. |
109 |
| - * @default 'right' |
110 |
| - * @type string |
111 |
| - */ |
112 |
| - placement: 'top' | 'right' | 'bottom' | 'left'; |
113 |
| - afterVisibleChange?: (visible: boolean) => void; |
114 |
| - keyboard?: boolean; |
115 |
| - /** |
116 |
| - * Specify a callback that will be called when a user clicks mask, close button or Cancel button. |
117 |
| - */ |
118 |
| - close(): void; |
| 9 | + $props: { |
| 10 | + /** |
| 11 | + * Whether a close (x) button is visible on top right of the Drawer dialog or not. |
| 12 | + * @default true |
| 13 | + * @type boolean |
| 14 | + */ |
| 15 | + closable?: boolean; |
| 16 | + |
| 17 | + /** |
| 18 | + * Whether to unmount child components on closing drawer or not. |
| 19 | + * @default false |
| 20 | + * @type boolean |
| 21 | + */ |
| 22 | + destroyOnClose?: boolean; |
| 23 | + |
| 24 | + /** |
| 25 | + * Return the mounted node for Drawer. |
| 26 | + * @default 'body' |
| 27 | + * @type any ( HTMLElement| () => HTMLElement | string) |
| 28 | + */ |
| 29 | + getContainer?: () => HTMLElement | string; |
| 30 | + |
| 31 | + /** |
| 32 | + * Whether to show mask or not. |
| 33 | + * @default true |
| 34 | + * @type boolean |
| 35 | + */ |
| 36 | + mask?: boolean; |
| 37 | + |
| 38 | + /** |
| 39 | + * Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
| 40 | + * @default true |
| 41 | + * @type boolean |
| 42 | + */ |
| 43 | + maskClosable?: boolean; |
| 44 | + |
| 45 | + /** |
| 46 | + * Style for Drawer's mask element. |
| 47 | + * @default {} |
| 48 | + * @type object |
| 49 | + */ |
| 50 | + maskStyle?: CSSProperties; |
| 51 | + |
| 52 | + /** |
| 53 | + * The title for Drawer. |
| 54 | + * @type any (string | slot) |
| 55 | + */ |
| 56 | + title?: VNodeChild | JSX.Element; |
| 57 | + |
| 58 | + /** |
| 59 | + * Whether the Drawer dialog is visible or not. |
| 60 | + * @default false |
| 61 | + * @type boolean |
| 62 | + */ |
| 63 | + visible?: boolean; |
| 64 | + |
| 65 | + /** |
| 66 | + * The class name of the container of the Drawer dialog. |
| 67 | + * @type string |
| 68 | + */ |
| 69 | + wrapClassName?: string; |
| 70 | + |
| 71 | + /** |
| 72 | + * Style of wrapper element which **contains mask** compare to `drawerStyle` |
| 73 | + * @type object |
| 74 | + */ |
| 75 | + wrapStyle?: CSSProperties; |
| 76 | + |
| 77 | + /** |
| 78 | + * Style of the popup layer element |
| 79 | + * @type object |
| 80 | + */ |
| 81 | + drawerStyle?: CSSProperties; |
| 82 | + |
| 83 | + /** |
| 84 | + * Style of floating layer, typically used for adjusting its position. |
| 85 | + * @type object |
| 86 | + */ |
| 87 | + bodyStyle?: CSSProperties; |
| 88 | + headerStyle?: CSSProperties; |
| 89 | + |
| 90 | + /** |
| 91 | + * Width of the Drawer dialog. |
| 92 | + * @default 256 |
| 93 | + * @type string | number |
| 94 | + */ |
| 95 | + width?: string | number; |
| 96 | + |
| 97 | + /** |
| 98 | + * placement is top or bottom, height of the Drawer dialog. |
| 99 | + * @type string | number |
| 100 | + */ |
| 101 | + height?: string | number; |
| 102 | + |
| 103 | + /** |
| 104 | + * The z-index of the Drawer. |
| 105 | + * @default 1000 |
| 106 | + * @type number |
| 107 | + */ |
| 108 | + zIndex?: number; |
| 109 | + |
| 110 | + /** |
| 111 | + * The placement of the Drawer. |
| 112 | + * @default 'right' |
| 113 | + * @type string |
| 114 | + */ |
| 115 | + placement?: 'top' | 'right' | 'bottom' | 'left'; |
| 116 | + afterVisibleChange?: (visible?: boolean) => void; |
| 117 | + keyboard?: boolean; |
| 118 | + |
| 119 | + /** |
| 120 | + * Specify a callback that will be called when a user clicks mask, close button or Cancel button. |
| 121 | + */ |
| 122 | + onClose?: (e?: Event) => void; |
| 123 | + }; |
119 | 124 | }
|
0 commit comments