Commit ab1235359bb4ff87ee7953f2a4c884a891705a52
Committed by
GitHub
Merge pull request #3445 from huanghong1125/table
fixed table
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
examples/routers/table.vue
src/components/table/table.vue
@@ -374,7 +374,7 @@ | @@ -374,7 +374,7 @@ | ||
374 | 374 | ||
375 | 375 | ||
376 | let unUsableWidth = hasWidthColumns.map(cell => cell.width).reduce((a, b) => a + b, 0); | 376 | let unUsableWidth = hasWidthColumns.map(cell => cell.width).reduce((a, b) => a + b, 0); |
377 | - let usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0); | 377 | + let usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0) - 1; |
378 | let usableLength = noWidthColumns.length; | 378 | let usableLength = noWidthColumns.length; |
379 | let columnWidth = 0; | 379 | let columnWidth = 0; |
380 | if(usableWidth > 0 && usableLength > 0){ | 380 | if(usableWidth > 0 && usableLength > 0){ |
@@ -447,7 +447,7 @@ | @@ -447,7 +447,7 @@ | ||
447 | } | 447 | } |
448 | } | 448 | } |
449 | 449 | ||
450 | - this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0); | 450 | + this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0) + 1; |
451 | this.columnsWidth = columnsWidth; | 451 | this.columnsWidth = columnsWidth; |
452 | this.fixedHeader(); | 452 | this.fixedHeader(); |
453 | }, | 453 | }, |