fixed scoll bar

This commit is contained in:
huanghong 2018-03-27 23:39:47 +08:00
parent eec3859c11
commit 75803add58
3 changed files with 81 additions and 9 deletions

View file

@ -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`,

View file

@ -896,6 +896,10 @@
height () {
this.handleResize();
this.fixedHeader();
},
showHorizontalScrollBar () {
this.handleResize();
this.fixedHeader();
}
}
};