From 8329ed5423dcdbe2f24d2d438cb8c422146925a4 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Sat, 15 May 2021 11:25:42 +0300 Subject: [PATCH] Initiated scrollable treetable --- src/assets/menu/menu.json | 6 + src/components/datatable/HeaderCell.vue | 2 +- src/components/treetable/TreeTable.vue | 136 +++++++++-- src/components/treetable/TreeTableRow.vue | 9 +- src/router/index.js | 5 + src/views/treetable/TreeTableScrollDemo.vue | 244 ++++++++++++++++++++ 6 files changed, 379 insertions(+), 23 deletions(-) create mode 100644 src/views/treetable/TreeTableScrollDemo.vue diff --git a/src/assets/menu/menu.json b/src/assets/menu/menu.json index f1d7e1619..85ef38a40 100644 --- a/src/assets/menu/menu.json +++ b/src/assets/menu/menu.json @@ -469,6 +469,7 @@ { "name": "TreeTable", "meta": ["treetable"], + "badge": "New", "children": [ { "name": "Documentation", @@ -510,6 +511,11 @@ "name": "Resize", "to": "/treetable/colresize" }, + { + "name": "Scroll", + "to": "/treetable/scroll", + "badge": "New" + }, { "name": "Responsive", "to": "/treetable/responsive" diff --git a/src/components/datatable/HeaderCell.vue b/src/components/datatable/HeaderCell.vue index dd414b106..2a32d7d75 100644 --- a/src/components/datatable/HeaderCell.vue +++ b/src/components/datatable/HeaderCell.vue @@ -153,7 +153,7 @@ export default { let right = 0; let next = this.$el.nextElementSibling; if (next) { - right = DomHandler.getOuterWidth(next) + parseFloat(next.style.left); + right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right); } this.styleObject.right = right + 'px'; } diff --git a/src/components/treetable/TreeTable.vue b/src/components/treetable/TreeTable.vue index cf2e89355..3167efa1b 100755 --- a/src/components/treetable/TreeTable.vue +++ b/src/components/treetable/TreeTable.vue @@ -17,12 +17,12 @@ -
+