fixed scoll bar
This commit is contained in:
parent
eec3859c11
commit
75803add58
3 changed files with 81 additions and 9 deletions
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</th>
|
||||
|
||||
<th v-if="$parent.showVerticalScrollBar" :rowspan="headRows.length"></th>
|
||||
<th v-if="$parent.showVerticalScrollBar && rowIndex===0" :class='scrollBarCellClass()' :rowspan="headRows.length"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
@ -131,6 +131,23 @@
|
|||
}
|
||||
];
|
||||
},
|
||||
scrollBarCellClass(){
|
||||
let hasRightFixed = false;
|
||||
for(var i in this.headRows){
|
||||
for(var j in this.headRows[i]){
|
||||
if(this.headRows[i][j].fixed === 'right') {
|
||||
hasRightFixed=true;
|
||||
break;
|
||||
}
|
||||
if(hasRightFixed) break;
|
||||
}
|
||||
}
|
||||
return [
|
||||
{
|
||||
[`${this.prefixCls}-hidden`]: hasRightFixed
|
||||
}
|
||||
];
|
||||
},
|
||||
itemClasses (column, item) {
|
||||
return [
|
||||
`${this.prefixCls}-filter-select-item`,
|
||||
|
|
|
@ -896,6 +896,10 @@
|
|||
height () {
|
||||
this.handleResize();
|
||||
this.fixedHeader();
|
||||
},
|
||||
showHorizontalScrollBar () {
|
||||
this.handleResize();
|
||||
this.fixedHeader();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue