diff --git a/src/components/treetable/BodyCell.vue b/src/components/treetable/BodyCell.vue index ce939a4d4..4affd4e64 100644 --- a/src/components/treetable/BodyCell.vue +++ b/src/components/treetable/BodyCell.vue @@ -91,7 +91,7 @@ export default { let right = 0; let next = this.$el.nextElementSibling; if (next) { - right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right); + right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0); } this.styleObject.right = right + 'px'; } @@ -99,7 +99,7 @@ export default { let left = 0; let prev = this.$el.previousElementSibling; if (prev) { - left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left); + left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0); } this.styleObject.left = left + 'px'; } diff --git a/src/components/treetable/FooterCell.vue b/src/components/treetable/FooterCell.vue index ee63fbb13..e1d497248 100644 --- a/src/components/treetable/FooterCell.vue +++ b/src/components/treetable/FooterCell.vue @@ -42,7 +42,7 @@ export default { let right = 0; let next = this.$el.nextElementSibling; if (next) { - right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right); + right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0); } this.styleObject.right = right + 'px'; } @@ -50,7 +50,7 @@ export default { let left = 0; let prev = this.$el.previousElementSibling; if (prev) { - left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left); + left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0); } this.styleObject.left = left + 'px'; } diff --git a/src/components/treetable/HeaderCell.vue b/src/components/treetable/HeaderCell.vue index c9df5bcab..07c3e1e53 100644 --- a/src/components/treetable/HeaderCell.vue +++ b/src/components/treetable/HeaderCell.vue @@ -67,7 +67,7 @@ export default { let right = 0; let next = this.$el.nextElementSibling; if (next) { - right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right); + right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0); } this.styleObject.right = right + 'px'; } @@ -75,7 +75,7 @@ export default { let left = 0; let prev = this.$el.previousElementSibling; if (prev) { - left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left); + left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0); } this.styleObject.left = left + 'px'; }