docs(Notification): completing descriptions of missing props (#41671)

* docs(Notification): completing descriptions of missing props.

* Update components/notification/index.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

---------

Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
Jiehui 2023-04-06 17:28:21 +08:00 committed by GitHub
parent 326d7a1074
commit 820abee5f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,7 @@ The properties of config are as follows:
| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 |
| onClick | Specify a function that will be called when the notification is clicked | function | - |
| onClose | Trigger when notification closed | function | - |
| props | Props passed down | Object | An object that can contain `data-*`, `aria-*`, or `role` props, to be put on the notification `div`. This currently only allows `data-testid` instead of `data-*` in TypeScript. See https://github.com/microsoft/TypeScript/issues/28960. |
| props | An object that can contain `data-*`, `aria-*`, or `role` props, to be put on the notification `div`. This currently only allows `data-testid` instead of `data-*` in TypeScript. See https://github.com/microsoft/TypeScript/issues/28960. | Object | - |
`notification` also provides a global `config()` method that can be used for specifying the default options. Once this method is used, all the notification boxes will take into account these globally defined options when displaying.

View File

@ -62,6 +62,7 @@ config 参数如下:
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 |
| onClick | 点击通知时触发的回调函数 | function | - |
| onClose | 当通知关闭时触发 | function | - |
| props | 透传至通知 `div` 上的 props 对象,支持传入 `data-*` `aria-*``role` 作为对象的属性。需要注意的是,虽然在 TypeScript 类型中声明的类型支持传入 `data-*` 作为对象的属性,但目前只允许传入 `data-testid` 作为对象的属性。 详见 https://github.com/microsoft/TypeScript/issues/28960 | Object | - |
### 全局配置