diff --git a/src/components/datatable/BodyCell.vue b/src/components/datatable/BodyCell.vue index 408c702fa..38da1f558 100755 --- a/src/components/datatable/BodyCell.vue +++ b/src/components/datatable/BodyCell.vue @@ -312,7 +312,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 || 0); } this.styleObject.right = right + 'px'; } @@ -320,7 +320,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/datatable/HeaderCell.vue b/src/components/datatable/HeaderCell.vue index c15c73f40..4233a6b77 100644 --- a/src/components/datatable/HeaderCell.vue +++ b/src/components/datatable/HeaderCell.vue @@ -156,7 +156,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'; } @@ -164,7 +164,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'; }