mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
chore: update rc-drawer & fix snap (#32007)
* chore: bump rc-drawer to 4.4.2 * feat: DrawerProps interface add autoFocus support * docs: add autoFocus to Drawer doc * fix: snapshot update * fix: snapshot update * Update components/drawer/index.en-US.md Co-authored-by: xrkffgg <xrkffgg@vip.qq.com> Co-authored-by: xrkffgg <xrkffgg@vip.qq.com>
This commit is contained in:
parent
ff6bf73173
commit
e4cbb9cedd
@ -12299,7 +12299,6 @@ exports[`ConfigProvider components Drawer configProvider 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="config-drawer config-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -12364,7 +12363,6 @@ exports[`ConfigProvider components Drawer configProvider componentSize large 1`]
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="config-drawer config-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -12429,7 +12427,6 @@ exports[`ConfigProvider components Drawer configProvider componentSize middle 1`
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="config-drawer config-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -12494,7 +12491,6 @@ exports[`ConfigProvider components Drawer configProvider virtual and dropdownMat
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -12559,7 +12555,6 @@ exports[`ConfigProvider components Drawer normal 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -12624,7 +12619,6 @@ exports[`ConfigProvider components Drawer prefixCls 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="prefix-Drawer prefix-Drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
|
@ -5,7 +5,6 @@ exports[`Drawer className is test_drawer 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right test_drawer"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -73,7 +72,6 @@ exports[`Drawer closable is false 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -107,7 +105,6 @@ exports[`Drawer destroyOnClose is true 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -245,7 +242,6 @@ exports[`Drawer have a footer 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -317,7 +313,6 @@ exports[`Drawer have a title 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -389,7 +384,6 @@ exports[`Drawer render correctly 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -456,7 +450,6 @@ exports[`Drawer render top drawer 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-top"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -525,7 +518,6 @@ exports[`Drawer style/drawerStyle/headerStyle/bodyStyle should work 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
style="background-color:#08c"
|
||||
tabindex="-1"
|
||||
@ -596,7 +588,6 @@ exports[`Drawer support closeIcon 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
tabindex="-1"
|
||||
>
|
||||
|
@ -313,7 +313,6 @@ exports[`renders ./components/drawer/demo/render-in-current.md correctly 1`] = `
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
autofocus=""
|
||||
class="ant-drawer ant-drawer-right"
|
||||
style="position:absolute"
|
||||
tabindex="-1"
|
||||
|
@ -20,6 +20,7 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
|
||||
|
||||
| Props | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| autoFocus | Whether Drawer should get focused after open | boolean | true | 4.17.0 |
|
||||
| afterVisibleChange | Callback after the animation ends when switching drawers | function(visible) | - | |
|
||||
| bodyStyle | Style of the drawer content part | object | - | |
|
||||
| className | The class name of the container of the Drawer dialog | string | - | |
|
||||
|
@ -29,6 +29,7 @@ export interface PushState {
|
||||
distance: string | number;
|
||||
}
|
||||
export interface DrawerProps {
|
||||
autoFocus?: boolean;
|
||||
closable?: boolean;
|
||||
closeIcon?: React.ReactNode;
|
||||
destroyOnClose?: boolean;
|
||||
|
@ -19,6 +19,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/7z8NJQhFb/Drawer.svg
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| autoFocus | 抽屉展开后是否将焦点切换至其 Dom 节点 | boolean | true | 4.17.0 |
|
||||
| afterVisibleChange | 切换抽屉时动画结束后的回调 | function(visible) | - | |
|
||||
| bodyStyle | 可用于设置 Drawer 内容部分的样式 | CSSProperties | - | |
|
||||
| className | 对话框外层容器的类名 | string | - | |
|
||||
|
@ -121,7 +121,7 @@
|
||||
"rc-checkbox": "~2.3.0",
|
||||
"rc-collapse": "~3.1.0",
|
||||
"rc-dialog": "~8.6.0",
|
||||
"rc-drawer": "~4.4.1",
|
||||
"rc-drawer": "~4.4.2",
|
||||
"rc-dropdown": "~3.2.0",
|
||||
"rc-field-form": "~1.21.0-2",
|
||||
"rc-image": "~5.2.5",
|
||||
|
Loading…
Reference in New Issue
Block a user