Commit 8f230d682a9ee24e25b36246d35a094ea3b5dccf

Authored by huanghong
1 parent 3dc998e6

fixed table

examples/routers/table.vue
  1 +<style>
  2 +table {
  3 + border-collapse: collapse;
  4 + border-spacing: 0;
  5 +}
  6 +</style>
  7 +
1 8 <template>
2 9 <div>
3 10 <!-- <br><br><br><br><br> -->
... ...
src/components/table/table.vue
... ... @@ -374,7 +374,7 @@
374 374  
375 375  
376 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 378 let usableLength = noWidthColumns.length;
379 379 let columnWidth = 0;
380 380 if(usableWidth > 0 && usableLength > 0){
... ... @@ -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 451 this.columnsWidth = columnsWidth;
452 452 this.fixedHeader();
453 453 },
... ...