-
+
@@ -25,6 +25,7 @@ demo:
+
## API
@@ -32,19 +33,20 @@ demo:
[AlertProps](https://4x-ant-design.antgroup.com/components/alert-cn/#API)
-| 参数 | 说明 | 类型 | 默认值 |
-| ------------- | ---------------------------------- | ----------------------------------------------------- | --------- |
-| activeKey | 右侧面板的内容的 Tabs 的选中项 | `string` | - |
-| banner | 提示 | `React.ReactNode \| AlertProps` | - |
-| bodyClassName | 内容容器的类名 | `string` | - |
-| bodyStyle | 内容容器的样式 | `CSSProperties` | - |
-| children | 右侧面板展示内容 | `(key: string) => React.ReactNode \| React.ReactNode` | - |
-| defaultKey | 右侧面板的内容的 Tabs 的默认选中项 | `string` | - |
-| footer | 右侧面板的底部内容 | `React.ReactNode` | - |
-| size | 尺寸 | `small \| default \| large` | `default` |
-| tabs | 右侧面板的内容的 Tabs | `{ key: string; title: React.ReactNode }[]` | - |
-| title | 右侧面板的 title | `React.ReactNode` | - |
-| onChange | 右侧面板的 Tabs 切换回调 | `(key: string) => void` | - |
+| 参数 | 说明 | 类型 | 默认值 |
+| ------------- | ---------------------------------- | ----------------------------------------------------- | ---------------------- |
+| activeKey | 右侧面板的内容的 Tabs 的选中项 | `string` | - |
+| banner | 提示 | `React.ReactNode \| AlertProps` | - |
+| bodyClassName | 内容容器的类名 | `string` | - |
+| bodyStyle | 内容容器的样式 | `CSSProperties` | - |
+| children | 右侧面板展示内容 | `(key: string) => React.ReactNode \| React.ReactNode` | - |
+| defaultKey | 右侧面板的内容的 Tabs 的默认选中项 | `string` | - |
+| footer | 右侧面板的底部内容 | `React.ReactNode` | - |
+| size | 尺寸 | `small \| default \| large` | `default` |
+| tabs | 右侧面板的内容的 Tabs | `{ key: string; title: React.ReactNode }[]` | - |
+| title | 右侧面板的 title | `React.ReactNode` | - |
+| type | 右侧面板的类型 | `SlidePaneType.Form \| SlidePaneType.Normal` | `SlidePaneType.Normal` |
+| onChange | 右侧面板的 Tabs 切换回调 | `(key: string) => void` | - |
:::info
其余属性继承 [antd4.x 的 Drawer](https://4x.ant.design/components/drawer-cn/#API)
diff --git a/src/drawer/index.tsx b/src/drawer/index.tsx
index d583675bc..366393787 100644
--- a/src/drawer/index.tsx
+++ b/src/drawer/index.tsx
@@ -1,4 +1,5 @@
import React, { CSSProperties, useEffect, useState } from 'react';
+import { CloseOutlined } from '@ant-design/icons';
import { Alert, AlertProps, Spin, Tabs } from 'antd';
import classNames from 'classnames';
import { omit } from 'lodash';
@@ -16,9 +17,12 @@ type readOnlyTab = readonly Tab[];
type TabKey
-
+