From 62373a134442b8d5fef24497ab73d474ea56dd32 Mon Sep 17 00:00:00 2001 From: JiwenBai Date: Fri, 11 Oct 2019 10:39:08 +0800 Subject: [PATCH] fixed(advance-table): light-ui border width cause scrollbar width computed incorrect --- package.json | 2 +- packages/common/AdvanceTable/src/main.vue | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c2d1120a0..beec0c940 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "naive-ui", - "version": "0.5.4", + "version": "0.5.5", "description": "", "main": "index.js", "scripts": { diff --git a/packages/common/AdvanceTable/src/main.vue b/packages/common/AdvanceTable/src/main.vue index 7f14a635c..f8a2a63c3 100644 --- a/packages/common/AdvanceTable/src/main.vue +++ b/packages/common/AdvanceTable/src/main.vue @@ -31,7 +31,7 @@ -
+
{ this.tbodyWidth = this.relTable.offsetWidth - this.scrollBarWidth = this.wrapperWidth - this.tbodyWidth - console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth) + this.scrollBarWidth = this.tbodyWrapperWidth - this.tbodyWidth + // console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth) }) }, computeCustomWidthStl (column) { @@ -658,6 +658,7 @@ export default { init () { this.$nextTick(() => { this.wrapperWidth = this.$refs.tableWrapper.offsetWidth + this.tbodyWrapperWidth = this.$refs.tbodyWrapper.clientWidth this.computeScollBar() // console.log(this.relTable.offsetWidth)