From 2d76bc2a989359a51aed9dee2e96eda775b49761 Mon Sep 17 00:00:00 2001 From: Libon Date: Thu, 10 Apr 2025 13:43:51 +0800 Subject: [PATCH] docs: correct the dropdown menu click event name --- docs/assets/demo/en/component/dropdown.md | 2 +- docs/assets/demo/en/interaction/context-menu.md | 2 +- docs/assets/demo/zh/component/dropdown.md | 2 +- docs/assets/demo/zh/interaction/context-menu.md | 2 +- ... customize the drop-down menu in table component.md | 10 +++++----- ...ustomize the context menu in the table component.md | 6 +++--- ... customize the drop-down menu in table component.md | 10 +++++----- ...ustomize the context menu in the table component.md | 6 +++--- docs/assets/guide/en/Event/event_list.md | 2 +- docs/assets/guide/zh/Event/event_list.md | 2 +- packages/vtable/src/scenegraph/component/menu.ts | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/assets/demo/en/component/dropdown.md b/docs/assets/demo/en/component/dropdown.md index 8e237859f2..7aa2715a4b 100644 --- a/docs/assets/demo/en/component/dropdown.md +++ b/docs/assets/demo/en/component/dropdown.md @@ -11,7 +11,7 @@ option: ListTable-columns-text#dropDownMenu # drop down menu In this example, the dropDownMenu is configured in the first column of columns, and when hovered to the header cell, a drop-down menu is displayed for further operation. -At the same time through monitoring`click_cell`Event, when the mouse clicks the order icon in the first column, the interface showDropDownMenu is called to display the drop-down menu. To continue the operation according to the item clicked on the drop-down menu, you can listen to the event dropdownmenu_click. +At the same time through monitoring`click_cell`Event, when the mouse clicks the order icon in the first column, the interface showDropDownMenu is called to display the drop-down menu. To continue the operation according to the item clicked on the drop-down menu, you can listen to the event dropdown_menu_click. ## Key Configurations diff --git a/docs/assets/demo/en/interaction/context-menu.md b/docs/assets/demo/en/interaction/context-menu.md index c1f987733a..ceb4e41a0f 100644 --- a/docs/assets/demo/en/interaction/context-menu.md +++ b/docs/assets/demo/en/interaction/context-menu.md @@ -10,7 +10,7 @@ option: ListTable#menu.contextMenuItems # Right click menu -Right-click pop-up menu, if you need to click on the drop-down menu to continue the operation, you can listen to the event dropdownmenu_click. +Right-click pop-up menu, if you need to click on the drop-down menu to continue the operation, you can listen to the event dropdown_menu_click. In this example, after clicking the right mouse button, a copy, paste, delete and other functions will appear in the drop-down menu. After clicking the copy, the selected cell content will be copied to the clipboard, after clicking paste, the content in the clipboard will be pasted to the selected cell, and after clicking delete, the content of the selected cell will be set to empty. diff --git a/docs/assets/demo/zh/component/dropdown.md b/docs/assets/demo/zh/component/dropdown.md index 88812b3a10..637e7182e6 100644 --- a/docs/assets/demo/zh/component/dropdown.md +++ b/docs/assets/demo/zh/component/dropdown.md @@ -11,7 +11,7 @@ option: ListTable-columns-text#dropDownMenu # 下拉菜单 在该示例中,在 columns 第一列中配置了 dropDownMenu, 当 hover 到表头单元格时会显示下拉菜单以进行进一步操作。 -同时通过监听`click_cell`事件,鼠标点击第一列中订单 icon 时,调用接口 showDropDownMenu 来显示下拉菜单。如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdownmenu_click。 +同时通过监听`click_cell`事件,鼠标点击第一列中订单 icon 时,调用接口 showDropDownMenu 来显示下拉菜单。如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdown_menu_click。 ## 关键配置 diff --git a/docs/assets/demo/zh/interaction/context-menu.md b/docs/assets/demo/zh/interaction/context-menu.md index e8f3695573..2a80edf1b1 100644 --- a/docs/assets/demo/zh/interaction/context-menu.md +++ b/docs/assets/demo/zh/interaction/context-menu.md @@ -10,7 +10,7 @@ option: ListTable#menu.contextMenuItems # 右键菜单 -右键弹出菜单, 如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdownmenu_click。 +右键弹出菜单, 如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdown_menu_click。 本例中,点击右键后会出现复制、粘贴、删除等功能的下拉菜单,点击复制后,会将选中的单元格内容复制到剪贴板,点击粘贴后,会将剪贴板中的内容粘贴到选中的单元格中,点击删除后,会将选中的单元格内容设置为空。 diff --git a/docs/assets/faq/en/16-How to customize the drop-down menu in table component.md b/docs/assets/faq/en/16-How to customize the drop-down menu in table component.md index c2f8e4b1be..9ffaecf78d 100644 --- a/docs/assets/faq/en/16-How to customize the drop-down menu in table component.md +++ b/docs/assets/faq/en/16-How to customize the drop-down menu in table component.md @@ -58,11 +58,11 @@ menu: { 2. Configure in the header dropDownMenu can be configured in columns. The items are the same as defaultHeaderMenuItems. The menu only takes effect in the corresponding column. 3. Menu selection status update - After the drop-down menu item is selected, the "dropdownmenu_click" event will be triggered. The listening event updates the drop-down menu status through the setDropDownMenuHighlight interface. The selected item text and icon will change the style. + After the drop-down menu item is selected, the "dropdown_menu_click" event will be triggered. The listening event updates the drop-down menu status through the setDropDownMenuHighlight interface. The selected item text and icon will change the style. ```javascript -table.on('dropdownmenu_click', (args: any) => { - console.log('dropdownmenu_click', args); +table.on('dropdown_menu_click', (args: any) => { + console.log('dropdown_menu_click', args); table.setDropDownMenuHighlight([args]); }); ``` @@ -140,8 +140,8 @@ const option: TYPES.ListTableConstructorOptions = { } }; const table = new ListTable(document.getElementById('container'), option); -table.on('dropdownmenu_click', (args: any) => { - console.log('dropdownmenu_click', args); +table.on('dropdown_menu_click', (args: any) => { + console.log('dropdown_menu_click', args); table.setDropDownMenuHighlight([args]); }); ``` diff --git a/docs/assets/faq/en/18-How to customize the context menu in the table component.md b/docs/assets/faq/en/18-How to customize the context menu in the table component.md index c3d5ec639b..753869eb55 100644 --- a/docs/assets/faq/en/18-How to customize the context menu in the table component.md +++ b/docs/assets/faq/en/18-How to customize the context menu in the table component.md @@ -38,10 +38,10 @@ Menu item configuration: - text: the text of the menu item - menuKey: unique identifier of the menu item -After the drop-down menu item is selected, the "dropdownmenu_click" event will be triggered, and you can listen to the event and perform related operations. +After the drop-down menu item is selected, the "dropdown_menu_click" event will be triggered, and you can listen to the event and perform related operations. ```javascript -table.on('dropdownmenu_click', (args: any) => { +table.on('dropdown_menu_click', (args: any) => { console.log('menu_click', args); }); ``` @@ -65,7 +65,7 @@ const option: TYPES.ListTableConstructorOptions = { } }; const table = new ListTable(document.getElementById('container'), option); -table.on('dropdownmenu_click', (args: any) => { +table.on('dropdown_menu_click', (args: any) => { console.log('menu_click', args); }); ``` diff --git a/docs/assets/faq/zh/16-How to customize the drop-down menu in table component.md b/docs/assets/faq/zh/16-How to customize the drop-down menu in table component.md index 9683ef1b7f..d887811c69 100644 --- a/docs/assets/faq/zh/16-How to customize the drop-down menu in table component.md +++ b/docs/assets/faq/zh/16-How to customize the drop-down menu in table component.md @@ -58,11 +58,11 @@ menu: { 2. 在表头中配置 在 columns 中可以配置 dropDownMenu,项目与 defaultHeaderMenuItems 相同,该菜单只在对应的列中生效。 3. 菜单选中状态更新 - 下拉菜单项目选中后,会触发"dropdownmenu_click"事件,监听事件事件通过 setDropDownMenuHighlight 接口更新下拉菜单状态,选中的项目文字和 icon 会更改样式。 + 下拉菜单项目选中后,会触发"dropdown_menu_click"事件,监听事件事件通过 setDropDownMenuHighlight 接口更新下拉菜单状态,选中的项目文字和 icon 会更改样式。 ```javascript -table.on('dropdownmenu_click', (args: any) => { - console.log('dropdownmenu_click', args); +table.on('dropdown_menu_click', (args: any) => { + console.log('dropdown_menu_click', args); table.setDropDownMenuHighlight([args]); }); ``` @@ -140,8 +140,8 @@ const option: TYPES.ListTableConstructorOptions = { } }; const table = new ListTable(document.getElementById('container'), option); -table.on('dropdownmenu_click', (args: any) => { - console.log('dropdownmenu_click', args); +table.on('dropdown_menu_click', (args: any) => { + console.log('dropdown_menu_click', args); table.setDropDownMenuHighlight([args]); }); ``` diff --git a/docs/assets/faq/zh/18-How to customize the context menu in the table component.md b/docs/assets/faq/zh/18-How to customize the context menu in the table component.md index 95eaf64ac5..517d9c4cc4 100644 --- a/docs/assets/faq/zh/18-How to customize the context menu in the table component.md +++ b/docs/assets/faq/zh/18-How to customize the context menu in the table component.md @@ -38,10 +38,10 @@ menu: { - text: 菜单项目的文字 - menuKey: 菜单项目的唯一标识符 -下拉菜单项目选中后,会触发"dropdownmenu_click"事件,可以监听事件事件执行相关操作。 +下拉菜单项目选中后,会触发"dropdown_menu_click"事件,可以监听事件事件执行相关操作。 ```javascript -table.on('dropdownmenu_click', (args: any) => { +table.on('dropdown_menu_click', (args: any) => { console.log('menu_click', args); }); ``` @@ -65,7 +65,7 @@ const option: TYPES.ListTableConstructorOptions = { } }; const table = new ListTable(document.getElementById('container'), option); -table.on('dropdownmenu_click', (args: any) => { +table.on('dropdown_menu_click', (args: any) => { console.log('menu_click', args); }); ``` diff --git a/docs/assets/guide/en/Event/event_list.md b/docs/assets/guide/en/Event/event_list.md index ced2ecbcdf..4391c9eb27 100644 --- a/docs/assets/guide/en/Event/event_list.md +++ b/docs/assets/guide/en/Event/event_list.md @@ -33,7 +33,7 @@ For a more comprehensive list of events, please refer to: https://visactor.io/vt | After sort | AFTER_SORT | Execute after sorting event | | Click Fixed Column | FREEZE_CLICK | Click Fixed Column Icon Event | | Scroll | SCROLL | Scroll Table Events | -| Click the drop-down icon | DROPDOWNMENU_CLICK | Click the drop-down menu icon event | +| Click the drop-down icon | DROPDOWN_MENU_CLICK | Click the drop-down menu icon event | | Click on the drop-down menu | MENU_CLICK | Click on the drop-down menu Events | | Mouse over miniature | MOUSEOVER_CHART_SYMBOL | Mouse over miniature mark events | | Drag and drop box to select mouse release | DRAG_SELECT_END | Drag and drop box to select cell mouse release event | diff --git a/docs/assets/guide/zh/Event/event_list.md b/docs/assets/guide/zh/Event/event_list.md index a31f2ed4f1..9927d0a0e9 100644 --- a/docs/assets/guide/zh/Event/event_list.md +++ b/docs/assets/guide/zh/Event/event_list.md @@ -35,7 +35,7 @@ | 滚动 | SCROLL | 滚动表格事件 | | 滚动 | SCROLL_HORIZONTAL_END | 横向滚动右侧事件 | | 滚动 | SCROLL_VERTICAL_END | 竖向滚动底部事件 | -| 点击下拉图标 | DROPDOWNMENU_CLICK | 点击下拉菜单图标事件 | +| 点击下拉图标 | DROPDOWN_MENU_CLICK | 点击下拉菜单图标事件 | | 点击下拉菜单 | MENU_CLICK | 点击下拉菜单事件 | | 鼠标经过迷你图 | MOUSEOVER_CHART_SYMBOL | 鼠标经过迷你图标记事件 | | 拖拽框选鼠标松开 | DRAG_SELECT_END | 拖拽框选单元格鼠标松开事件 | diff --git a/packages/vtable/src/scenegraph/component/menu.ts b/packages/vtable/src/scenegraph/component/menu.ts index 1a5b324095..3381d0c917 100644 --- a/packages/vtable/src/scenegraph/component/menu.ts +++ b/packages/vtable/src/scenegraph/component/menu.ts @@ -326,7 +326,7 @@ export class MenuHandler { result.event = e.nativeEvent; this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, result); - // 由DROPDOWNMENU_CLICK事件清空菜单 + // 由DROPDOWN_MENU_CLICK事件清空菜单 // this.detach(); } });