You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api/ContextMenuInstance.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ Global Function
20
20
| Param | Description |
21
21
| :----: | :----: |
22
22
| options | The options of menu. |
23
-
| customSlots | These slots to allow you to customize the style of the current menu, the names of these slots are the same as those in the [component mode](#ContextMenu). |
23
+
| customSlots | These slots to allow you to customize the style of the current menu, the names of these slots are the same as those in the [component mode](#ContextMenu). For customization methods, please refer in [here](../guide/customize.md). |
24
24
25
25
Return
26
26
27
27
| Type | Description |
28
28
| :----: | :----: |
29
-
| ContextMenuInstance | The instance of the current menu, can calling 'closeMenu' to close this menu. |
29
+
| ContextMenuInstance | The instance of the current menu, can calling `closeMenu` to close this menu, calling `isClosed` to check if the menu is currently closed. |
30
30
31
31
### `ContextMenu.closeContextMenu()`
32
32
@@ -77,6 +77,7 @@ Global Function
77
77
| adjustPosition | By default, the menu will automatically adjust its position to prevent it overflow the container. If you allow menu overflow containers, you can set this to false. |`boolean`| — |`true`|
78
78
| direction | Set the mian menu pop-up direction relative to coordinates. Default is `'br'`, if `adjustPosition` is true then the menu will determine the pop-up direction based on its distance from the screen edge. |`'br' or 'b' or 'bl' or 'tr' or 't' or 'tl' or 'l' or 'r'`| — |`'br'`|
79
79
| ignoreClickClassName | If your element in menu item has this className, click it will ignore event. |`string`| — |
80
+
| clickCloseOnOutside | Set should close menu when the user click on other places. |`boolean`|`true`|
80
81
| clickCloseClassName | If your element in menu item has this className, click it will ignore event and close hole menu. |`string`| — |
81
82
| updownButtonSpaceholder | Determine whether the up/down buttons in the menu item require space holder. The purpose of this variable is because some menu themes add blank padding above and below the menu, which are just enough to place up/down buttons. If there is no blank padding in your custom menu theme, you can set this field to provide blank space for up/down buttons to prevent obscuring menu items. |`boolean`| — |`false`|
82
83
| getContainer | Return the mounted node for MenuRoot. [Guide](../guide/custom-container.en.md)|`HTMLElement` or `(() => HTMLElement)`| — | — |
0 commit comments