fixed table scrollbar bug

This commit is contained in:
huanghong 2018-03-16 21:17:33 +08:00
parent 6bc3b19f22
commit 47638ad84a
4 changed files with 38 additions and 7 deletions

View file

@ -85,7 +85,9 @@
computed: {
styles () {
const style = Object.assign({}, this.styleObject);
const width = this.$parent.bodyHeight === 0 ? parseInt(this.styleObject.width) : parseInt(this.styleObject.width) + this.$parent.scrollBarWidth;
let scrollBarWidth = this.$parent.scrollBarWidth;
if(!this.$parent.showScrollBar()) scrollBarWidth = 0;
const width = this.$parent.bodyHeight === 0 ? parseInt(this.styleObject.width) : parseInt(this.styleObject.width) + scrollBarWidth;
style.width = `${width}px`;
return style;
},