Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/demo/en/component/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demo/en/interaction/context-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demo/zh/component/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

## 关键配置

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demo/zh/interaction/context-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option: ListTable#menu.contextMenuItems

# 右键菜单

右键弹出菜单, 如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdownmenu_click
右键弹出菜单, 如需根据点击下拉菜单的项目来继续操作,可以监听事件 dropdown_menu_click

本例中,点击右键后会出现复制、粘贴、删除等功能的下拉菜单,点击复制后,会将选中的单元格内容复制到剪贴板,点击粘贴后,会将剪贴板中的内容粘贴到选中的单元格中,点击删除后,会将选中的单元格内容设置为空。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
```
Expand Down Expand Up @@ -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]);
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
```
Expand All @@ -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);
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
```
Expand Down Expand Up @@ -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]);
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
```
Expand All @@ -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);
});
```
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/en/Event/event_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/zh/Event/event_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
| 滚动 | SCROLL | 滚动表格事件 |
| 滚动 | SCROLL_HORIZONTAL_END | 横向滚动右侧事件 |
| 滚动 | SCROLL_VERTICAL_END | 竖向滚动底部事件 |
| 点击下拉图标 | DROPDOWNMENU_CLICK | 点击下拉菜单图标事件 |
| 点击下拉图标 | DROPDOWN_MENU_CLICK | 点击下拉菜单图标事件 |
| 点击下拉菜单 | MENU_CLICK | 点击下拉菜单事件 |
| 鼠标经过迷你图 | MOUSEOVER_CHART_SYMBOL | 鼠标经过迷你图标记事件 |
| 拖拽框选鼠标松开 | DRAG_SELECT_END | 拖拽框选单元格鼠标松开事件 |
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/scenegraph/component/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down
Loading