Commit ab1235359bb4ff87ee7953f2a4c884a891705a52

Authored by Aresn
Committed by GitHub
2 parents 3dc998e6 8f230d68

Merge pull request #3445 from huanghong1125/table

fixed table
examples/routers/table.vue
  1 +<style>
  2 +table {
  3 + border-collapse: collapse;
  4 + border-spacing: 0;
  5 +}
  6 +</style>
  7 +
1 <template> 8 <template>
2 <div> 9 <div>
3 <!-- <br><br><br><br><br> --> 10 <!-- <br><br><br><br><br> -->
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 },