fixed table scollbar

This commit is contained in:
huanghong 2018-03-27 22:26:56 +08:00
parent 6b90a39c12
commit eec3859c11
6 changed files with 19 additions and 36 deletions

View file

@ -5,7 +5,7 @@
<div :class="[prefixCls + '-header']" v-if="showHeader" ref="header" @mousewheel="handleMouseWheel">
<table-head
:prefix-cls="prefixCls"
:styleObject="tableStyle"
:styleObject="tableHeaderStyle"
:columns="cloneColumns"
:column-rows="columnRows"
:obj-data="objData"
@ -275,6 +275,15 @@
}
return style;
},
tableHeaderStyle () {
let style = {};
if (this.tableWidth !== 0) {
let width = '';
width = this.tableWidth;
style.width = `${width}px`;
}
return style;
},
fixedTableStyle () {
let style = {};
let width = 0;