fixed table
This commit is contained in:
parent
408b695046
commit
c1115edd1a
2 changed files with 4 additions and 4 deletions
|
@ -12,10 +12,10 @@
|
|||
<Table :height='200' border :columns="columns2" :data="data3"></Table>
|
||||
</div>
|
||||
<div style='margin:20px 0px'>
|
||||
<Table :width='500' border :columns="columns2" :data="data3"></Table>
|
||||
<Table :width='600' border :columns="columns2" :data="data3"></Table>
|
||||
</div>
|
||||
<div style='margin:20px 0px'>
|
||||
<Table :width='500' :height='200' border :columns="columns2" :data="data3"></Table>
|
||||
<Table :width='600' :height='200' border :columns="columns2" :data="data3"></Table>
|
||||
</div>
|
||||
<div style='margin:20px 0px;'>
|
||||
Table scrolling <i-switch v-model="fixedHeader" style="margin-right: 5px"></i-switch>
|
||||
|
|
|
@ -32,8 +32,8 @@ export default {
|
|||
}
|
||||
// when fixed type,reset first right fixed column's width
|
||||
if (this.fixed === 'right' && top ) {
|
||||
const firstFixedIndex = this.columns.findIndex((col) => col.fixed === 'right');
|
||||
if (firstFixedIndex === index) {
|
||||
//const firstFixedIndex = this.columns.findIndex((col) => col.fixed === 'right');
|
||||
if (this.columns.length === index + 1) {
|
||||
let scrollBarWidth = this.$parent.scrollBarWidth;
|
||||
if (!this.$parent.showVerticalScrollBar) scrollBarWidth = 0;
|
||||
width += scrollBarWidth;
|
||||
|
|
Loading…
Add table
Reference in a new issue