fixed table

This commit is contained in:
huanghong 2018-04-19 14:45:02 +08:00
parent 3dc998e6ab
commit 8f230d682a
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
<style>
table {
border-collapse: collapse;
border-spacing: 0;
}
</style>
<template>
<div>
<!-- <br><br><br><br><br> -->

View file

@ -374,7 +374,7 @@
let unUsableWidth = hasWidthColumns.map(cell => cell.width).reduce((a, b) => a + b, 0);
let usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0);
let usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0) - 1;
let usableLength = noWidthColumns.length;
let columnWidth = 0;
if(usableWidth > 0 && usableLength > 0){
@ -447,7 +447,7 @@
}
}
this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0);
this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0) + 1;
this.columnsWidth = columnsWidth;
this.fixedHeader();
},