From 1ff31531e9ee0d603d045306a49a21b34ece738b Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 9 Dec 2019 11:34:31 +0300 Subject: [PATCH] Docs for ContextMenu and DataTable --- src/components/datatable/DataTable.d.ts | 2 + src/components/datatable/DataTable.vue | 43 ++++--- src/components/datatable/TableBody.vue | 22 +++- src/components/tabmenu/TabMenu.vue | 2 +- src/router.js | 5 + .../datatable/DataTableContextMenuDemo.vue | 120 ++++++++++++++++++ src/views/datatable/DataTableDoc.vue | 70 +++++++++- src/views/datatable/DataTableSubMenu.vue | 1 + src/views/panelmenu/PanelMenuDemo.vue | 2 +- src/views/panelmenu/PanelMenuDoc.vue | 4 +- 10 files changed, 249 insertions(+), 22 deletions(-) create mode 100644 src/views/datatable/DataTableContextMenuDemo.vue diff --git a/src/components/datatable/DataTable.d.ts b/src/components/datatable/DataTable.d.ts index bbdf20dd8..f1dc7bc67 100644 --- a/src/components/datatable/DataTable.d.ts +++ b/src/components/datatable/DataTable.d.ts @@ -28,6 +28,7 @@ export declare class DataTable extends Vue { selectionMode?: string; compareSelectionBy?: string; metaKeySelection?: boolean; + contextMenuSelection?: any; rowHover?: boolean; csvSeparator?: string; exportFilename?: string; @@ -58,6 +59,7 @@ export declare class DataTable extends Vue { $emit(eventName: 'sort', event: Event): this; $emit(eventName: 'filter', event: Event): this; $emit(eventName: 'row-click', event: Event): this; + $emit(eventName: 'row-contextmenu', event: Event): this; $emit(eventName: 'row-select', event: Event): this; $emit(eventName: 'row-unselect', event: Event): this; $emit(eventName: 'column-resize-end', event: Event): this; diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index a42a3db15..b6f6c4be5 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -27,11 +27,11 @@ @column-click="onColumnHeaderClick($event)" @column-mousedown="onColumnHeaderMouseDown($event)" @column-dragstart="onColumnHeaderDragStart($event)" @column-dragover="onColumnHeaderDragOver($event)" @column-dragleave="onColumnHeaderDragLeave($event)" @column-drop="onColumnHeaderDrop($event)" @column-resizestart="onColumnResizeStart($event)" @checkbox-change="toggleRowsWithCheckbox($event)" /> -