diff --git a/docs/assets/api/en/event/event.md b/docs/assets/api/en/event/event.md index 9ae524ec3..4f7ee1ac7 100644 --- a/docs/assets/api/en/event/event.md +++ b/docs/assets/api/en/event/event.md @@ -36,7 +36,7 @@ Supported event types: SORT_CLICK: 'sort_click', FREEZE_CLICK: 'freeze_click', SCROLL: 'scroll', - DROPDOWNMENU_CLICK: 'dropdownmenu_click', + DROPDOWN_MENU_CLICK: 'dropdown_menu_click', MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol', DRAG_SELECT_END: 'drag_select_end', DROPDOWN_ICON_CLICK: 'dropdown_icon_click', @@ -199,11 +199,6 @@ Event callback function parameter types. viewHeight: number; }` -## DROPDOWNMENU_CLICK - -Click on the drop-down menu icon event. - -{{ use: DropDownMenuEventArgs() }} ## MOUSEOVER_CHART_SYMBOL @@ -229,6 +224,12 @@ Click on the drop-down menu button {{ use: CellAddress() }} +## DROPDOWN_MENU_CLICK + +The drop-down menu options click on the event + +{{ use: DropDownMenuEventArgs() }} + ## DROPDOWN_MENU_CLEAR Clear drop-down menu event (clicking on other areas while the menu is displayed) diff --git a/docs/assets/api/zh/event/event.md b/docs/assets/api/zh/event/event.md index dd555b65b..88a90b7ff 100644 --- a/docs/assets/api/zh/event/event.md +++ b/docs/assets/api/zh/event/event.md @@ -38,7 +38,7 @@ TABLE_EVENT_TYPE = { SORT_CLICK: 'sort_click', FREEZE_CLICK: 'freeze_click', SCROLL: 'scroll', - DROPDOWNMENU_CLICK: 'dropdownmenu_click', + DROPDOWN_MENU_CLICK: 'dropdown_menu_click', MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol', DRAG_SELECT_END: 'drag_select_end', DROPDOWN_ICON_CLICK: 'dropdown_icon_click', @@ -214,12 +214,6 @@ TABLE_EVENT_TYPE = { } ``` -## DROPDOWNMENU_CLICK - -点击下拉菜单图标事件。 - -{{ use: DropDownMenuEventArgs() }} - ## MOUSEOVER_CHART_SYMBOL 鼠标经过迷你图标记事件 @@ -244,6 +238,12 @@ TABLE_EVENT_TYPE = { {{ use: CellAddress() }} +## DROPDOWN_MENU_CLICK + +下拉菜单选项的点击事件。 + +{{ use: DropDownMenuEventArgs() }} + ## DROPDOWN_MENU_CLEAR 清空下拉菜单事件(菜单显示时点击其他区域) diff --git a/docs/assets/demo/en/component/dropdown.md b/docs/assets/demo/en/component/dropdown.md index 57038e091..8645be79e 100644 --- a/docs/assets/demo/en/component/dropdown.md +++ b/docs/assets/demo/en/component/dropdown.md @@ -220,8 +220,8 @@ tableInstance.on('click_cell', (args) => { }); } }); - tableInstance.on('dropdownmenu_click', (args) => { - console.log('dropdownmenu_click',args); + tableInstance.on('dropdown_menu_click', (args) => { + console.log('dropdown_menu_click',args); tableInstance.setDropDownMenuHighlight([args]); }) }) diff --git a/docs/assets/demo/en/interaction/context-menu.md b/docs/assets/demo/en/interaction/context-menu.md index 112d530da..7ba2b0ac4 100644 --- a/docs/assets/demo/en/interaction/context-menu.md +++ b/docs/assets/demo/en/interaction/context-menu.md @@ -95,8 +95,8 @@ tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), opti window['tableInstance'] = tableInstance; -tableInstance.on('dropdownmenu_click', (args) => { - console.log('dropdownmenu_click',args); +tableInstance.on('dropdown_menu_click', (args) => { + console.log('dropdown_menu_click',args); }) }) ``` diff --git a/docs/assets/demo/zh/component/dropdown.md b/docs/assets/demo/zh/component/dropdown.md index 89ad55ab0..bff5a9326 100644 --- a/docs/assets/demo/zh/component/dropdown.md +++ b/docs/assets/demo/zh/component/dropdown.md @@ -220,8 +220,8 @@ tableInstance.on('click_cell', (args) => { }); } }); - tableInstance.on('dropdownmenu_click', (args) => { - console.log('dropdownmenu_click',args); + tableInstance.on('dropdown_menu_click', (args) => { + console.log('dropdown_menu_click',args); tableInstance.setDropDownMenuHighlight([args]); }) }) diff --git a/docs/assets/demo/zh/interaction/context-menu.md b/docs/assets/demo/zh/interaction/context-menu.md index eec464580..8d55dcb4c 100644 --- a/docs/assets/demo/zh/interaction/context-menu.md +++ b/docs/assets/demo/zh/interaction/context-menu.md @@ -95,8 +95,8 @@ tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),optio window['tableInstance'] = tableInstance; -tableInstance.on('dropdownmenu_click', (args) => { - console.log('dropdownmenu_click',args); +tableInstance.on('dropdown_menu_click', (args) => { + console.log('dropdown_menu_click',args); }) }) ``` diff --git a/docs/assets/guide/en/Event/event_list.md b/docs/assets/guide/en/Event/event_list.md index 9310f66c3..f5e7a38f7 100644 --- a/docs/assets/guide/en/Event/event_list.md +++ b/docs/assets/guide/en/Event/event_list.md @@ -58,7 +58,7 @@ The specific return data of the event can be actually tested to observe whether CHANGED_VALUE, FREEZE_CLICK, SORT_CLICK, - DROPDOWNMENU_CLICK, + DROPDOWN_MENU_CLICK, CONTEXTMENU_CELL, } = VTable.ListTable.EVENT_TYPE; const tableInstance =new ListTable(options); diff --git a/docs/assets/guide/zh/Event/event_list.md b/docs/assets/guide/zh/Event/event_list.md index 495a92220..ea9722c4a 100644 --- a/docs/assets/guide/zh/Event/event_list.md +++ b/docs/assets/guide/zh/Event/event_list.md @@ -61,7 +61,7 @@ const { CHANGED_VALUE, FREEZE_CLICK, SORT_CLICK, - DROPDOWNMENU_CLICK, + DROPDOWN_MENU_CLICK, CONTEXTMENU_CELL, } = VTable.ListTable.EVENT_TYPE; const tableInstance =new ListTable(options); diff --git a/docs/assets/option/en/register/theme.md b/docs/assets/option/en/register/theme.md index 404c27219..114051b46 100644 --- a/docs/assets/option/en/register/theme.md +++ b/docs/assets/option/en/register/theme.md @@ -36,7 +36,7 @@ Supported event types: SORT_CLICK: 'sort_click', FREEZE_CLICK: 'freeze_click', SCROLL: 'scroll', - DROPDOWNMENU_CLICK: 'dropdownmenu_click', + DROPDOWN_MENU_CLICK: 'dropdown_menu_click', MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol', DRAG_SELECT_END: 'drag_select_end', DROPDOWN_ICON_CLICK: 'dropdown_icon_click', @@ -199,7 +199,7 @@ Event callback function parameter types. viewHeight: number; }` -## DROPDOWNMENU_CLICK +## DROPDOWN_MENU_CLICK Click the drop-down menu icon event. diff --git a/docs/assets/option/zh/register/theme.md b/docs/assets/option/zh/register/theme.md index 95cfc728a..aece82490 100644 --- a/docs/assets/option/zh/register/theme.md +++ b/docs/assets/option/zh/register/theme.md @@ -38,7 +38,7 @@ TABLE_EVENT_TYPE = { SORT_CLICK: 'sort_click', FREEZE_CLICK: 'freeze_click', SCROLL: 'scroll', - DROPDOWNMENU_CLICK: 'dropdownmenu_click', + DROPDOWN_MENU_CLICK: 'dropdown_menu_click', MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol', DRAG_SELECT_END: 'drag_select_end', DROPDOWN_ICON_CLICK: 'dropdown_icon_click', @@ -214,7 +214,7 @@ TABLE_EVENT_TYPE = { } ``` -## DROPDOWNMENU_CLICK +## DROPDOWN_MENU_CLICK 点击下拉菜单图标事件。 diff --git a/packages/vtable/examples/custom-layout-jsx/pivot-jsx.tsx b/packages/vtable/examples/custom-layout-jsx/pivot-jsx.tsx index 69a0faaef..340acae2a 100644 --- a/packages/vtable/examples/custom-layout-jsx/pivot-jsx.tsx +++ b/packages/vtable/examples/custom-layout-jsx/pivot-jsx.tsx @@ -1118,7 +1118,7 @@ function customLayoutIndicator(args: VTable.TYPES.CustomRenderFunctionArg) { } function bindEvent(table) { - const { CLICK_CELL, DROPDOWNMENU_CLICK } = VTable.ListTable.EVENT_TYPE; + const { CLICK_CELL, DROPDOWN_MENU_CLICK } = VTable.ListTable.EVENT_TYPE; table.addEventListener(CLICK_CELL, (...args) => { if (args[0].target) { const target = args[0].target; diff --git a/packages/vtable/src/components/menu/dom/logic/MenuContainer.ts b/packages/vtable/src/components/menu/dom/logic/MenuContainer.ts index 7e30dd342..62306bbee 100644 --- a/packages/vtable/src/components/menu/dom/logic/MenuContainer.ts +++ b/packages/vtable/src/components/menu/dom/logic/MenuContainer.ts @@ -50,7 +50,7 @@ export class MenuContainer { : table.getHeaderField(col, row); const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex); - table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, { + table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, { col, row, field: field, diff --git a/packages/vtable/src/components/menu/dom/logic/MenuElement.ts b/packages/vtable/src/components/menu/dom/logic/MenuElement.ts index c18ed623b..af0079975 100644 --- a/packages/vtable/src/components/menu/dom/logic/MenuElement.ts +++ b/packages/vtable/src/components/menu/dom/logic/MenuElement.ts @@ -130,7 +130,7 @@ export class MenuElement { : table.getHeaderField(col, row); const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex); - table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, { + table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, { col, row, field: field, @@ -166,7 +166,7 @@ export class MenuElement { : table.getHeaderField(col, row); const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex); - table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, { + table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, { col, row, field: field, @@ -313,7 +313,7 @@ export class MenuElement { } }); - table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, { + table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, { col, row, field: field, diff --git a/packages/vtable/src/core/TABLE_EVENT_TYPE.ts b/packages/vtable/src/core/TABLE_EVENT_TYPE.ts index cf32bf577..b1aad5c03 100644 --- a/packages/vtable/src/core/TABLE_EVENT_TYPE.ts +++ b/packages/vtable/src/core/TABLE_EVENT_TYPE.ts @@ -76,7 +76,7 @@ export interface TableEvents { /** * 点击下拉菜单图标事件 */ - DROPDOWNMENU_CLICK: 'dropdownmenu_click'; + DROPDOWN_MENU_CLICK: 'dropdown_menu_click'; /** * 鼠标经过迷你图标记事件 */ @@ -147,7 +147,7 @@ export const TABLE_EVENT_TYPE: TableEvents = { SORT_CLICK: 'sort_click', FREEZE_CLICK: 'freeze_click', SCROLL: 'scroll', - DROPDOWNMENU_CLICK: 'dropdownmenu_click', + DROPDOWN_MENU_CLICK: 'dropdown_menu_click', MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol', DRAG_SELECT_END: 'drag_select_end', diff --git a/packages/vtable/src/event/event.ts b/packages/vtable/src/event/event.ts index cd2768574..d3a5002ef 100644 --- a/packages/vtable/src/event/event.ts +++ b/packages/vtable/src/event/event.ts @@ -82,7 +82,7 @@ export class EventManeger { }); // 下拉菜单内容点击 - this.table.on(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, () => { + this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => { stateManeger.hideMenu(); }); diff --git a/packages/vtable/src/scenegraph/component/menu.ts b/packages/vtable/src/scenegraph/component/menu.ts index 52d0087a8..a8ef6193c 100644 --- a/packages/vtable/src/scenegraph/component/menu.ts +++ b/packages/vtable/src/scenegraph/component/menu.ts @@ -317,7 +317,7 @@ export class MenuHandler { const resultMenuInfo = this.getEventInfo(target as unknown as Group); const resultTableInfo = this._table.getMenuInfo(this._menuInfo.col, this._menuInfo.row, this._menuInfo.type); const result = Object.assign(resultMenuInfo, resultTableInfo); - this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, result); + this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, result); // 由DROPDOWNMENU_CLICK事件清空菜单 // this.detach(); diff --git a/packages/vtable/src/ts-types/events.ts b/packages/vtable/src/ts-types/events.ts index fe7301781..01d0f966d 100644 --- a/packages/vtable/src/ts-types/events.ts +++ b/packages/vtable/src/ts-types/events.ts @@ -91,7 +91,7 @@ export interface TableEventHandlersEventArgumentMap { order: SortOrder; }; freeze_click: { col: number; row: number; fields: FieldDef[]; colCount: number }; - dropdownmenu_click: DropDownMenuEventArgs; + dropdown_menu_click: DropDownMenuEventArgs; copydata: CellRange[]; mouseover_chart_symbol: MousePointerSparklineEvent; @@ -189,7 +189,7 @@ export interface TableEventHandlersReturnMap { change_header_position: void; sort_click: boolean; freeze_click: void; - dropdownmenu_click: void; + dropdown_menu_click: void; copydata: string; mouseover_chart_symbol: void; drag_select_end: void;