We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d04efe4 commit 046a2d2Copy full SHA for 046a2d2
packages/vue/src/grid/src/table/src/methods.ts
@@ -1016,8 +1016,8 @@ const Methods = {
1016
let { fit, columnStore, columnChart, isGroup } = this
1017
let tableHeight = bodyEl.offsetHeight
1018
let overflowY = bodyEl.scrollHeight > bodyEl.clientHeight
1019
- // 解决缩放时会出现滚动条的问题
1020
- let bodyW = Math.floor(bodyEl.getBoundingClientRect().width)
+ // 当浏览器缩放时,实际宽度会出现小数点,clientWidth会取整,此处减去1px解决缩放时会出现滚动条的问题
+ let bodyW = bodyEl.clientWidth - 1
1021
let { leftList, rightList } = columnStore
1022
1023
// 此处操作很重要,这里会计算所有列的宽度并且计算出表格整体宽度
0 commit comments