Browse Source

docs: update dropdown docs

pointhalo 2 years ago
parent
commit
abfbd886d0

+ 1 - 0
content/show/dropdown/index-en-US.md

@@ -434,6 +434,7 @@ function DropdownEvents() {
 | children | Child elements wrapped by the drop layer                                                                                                                                                                                                      | ReactNode |  |  |
 | clickToHide | Whether to close the drop-down layer automatically when clicking on the drop-down layer                                                                                                                                                       | boolean |  | **0.24.0** |
 | contentClassName | Drop-down menu root element class name                                                                                                                                                                                                        | string |  |  |
+| keepDOM | Whether to keep the internal component DOM from being destroyed when closing | boolean | false | **2.31.0** |
 | getPopupContainer | Specifies the parent DOM, and the bullet layer will be rendered to the DOM, you need to set 'position: relative`  This will change the DOM tree position, but not the view's rendering position.                                                                                                                              | function():HTMLElement | () => document.body |
 | margin | Popup layer calculates the size of the safe area when the current direction overflows, used in scenes covered by fixed elements, more detail refer to [issue#549](https://github.com/DouyinFE/semi-design/issues/549), same as Tooltip margin | object\|number |  | 2.25.0 |
 | mouseEnterDelay | After the mouse is moved into the Trigger, the display time is delayed, in milliseconds (only effective when the trigger is hover/focus)                                                                                                      | number | 50 |  |

+ 1 - 0
content/show/dropdown/index.md

@@ -432,6 +432,7 @@ function DropdownEvents() {
 | clickToHide | 在弹出层内点击时是否自动关闭弹出层                                                                                                            | boolean |  | **0.24.0** |
 | contentClassName | 下拉菜单根元素类名                                                                                                                    | string |  |  |
 | getPopupContainer | 指定父级 DOM,弹层将会渲染至该 DOM 中,自定义需要设置 `position: relative` 这会改变浮层 DOM 树位置,但不会改变视图渲染位置。                                                                         | function():HTMLElement | () => document.body |  |
+| keepDOM | 关闭时是否保留内部组件 DOM 不销毁 | boolean | false | **2.31.0** |
 | margin| 弹出层计算溢出时的增加的冗余值,详见[issue#549](https://github.com/DouyinFE/semi-design/issues/549),作用同 Tooltip margin                         | number\|object  |  |  **2.25.0**   |
 | mouseEnterDelay | 鼠标移入 Trigger 后,延迟显示的时间,单位毫秒(仅当 trigger 为 hover/focus 时生效)                                                                    | number | 50 |  |
 | mouseLeaveDelay | 鼠标移出弹出层后,延迟消失的时间,单位毫秒(仅当 trigger 为 hover/focus 时生效)                                                                          | number | 50 |  |

+ 1 - 1
content/show/popover/index-en-US.md

@@ -26,7 +26,7 @@ import { Popover } from '@douyinfe/semi-ui';
 
 Tooltip needs to apply DOM event listeners to children. If the child element is a custom component, you need to ensure that it can pass properties to the underlying DOM element 
 
-At the same time, in order to calculate the positioning of the popup layer, it is necessary to obtain the real DOM elements of the children, so Tooltip supports the following types of children 
+At the same time, in order to calculate the positioning of the popup layer, it is necessary to obtain the real DOM elements of the children, so Popover supports the following types of children 
 
 1. Class Component, it is not mandatory to bind ref, but you need to ensure that props can be transparently transmitted to the real DOM node 
 2. Use the functional component wrapped by forwardRef to transparently transmit props and ref to the real DOM node in children 

+ 1 - 1
content/show/popover/index.md

@@ -25,7 +25,7 @@ import { Popover } from '@douyinfe/semi-ui';
 
 Popover 需要将 DOM 事件监听器应用到 children 中,如果子元素是自定义的组件,你需要确保它能将属性传递至底层的 DOM 元素
 
-同时为了计算弹出层的定位,需要获取到 children 的真实 DOM 元素,因此 Tooltip 支持如下类型的 children
+同时为了计算弹出层的定位,需要获取到 children 的真实 DOM 元素,因此 Popover 支持如下类型的 children
 
 1. Class Component,不强制绑定ref,但需要确保 props 可被透传至真实的 DOM 节点上
 2. 使用 forwardRef 包裹后的函数式组件,将 props 与 ref 透传到 children 内真实的 DOM 节点上