Element: [Bug Report] ElTable is shaking wildly

Created on 17 Jun 2019  ·  6Comments  ·  Source: ElemeFE/element

Element UI version

2.9.1

OS/Browsers version

Window7 / Chrome 75.0.3770.90

Vue version

2.6.10

Reproduction Link

https://codepen.io/anon/pen/ydOvRd

Steps to reproduce

  1. 在Windows系统下打开重现链接
  2. 查看表格

What is Expected?

ElTable没有抖动

What is actually happening?

表格在某些高度(通常是滚动条即将出现时)下出现抖动,根本停不下来

table bug

Most helpful comment

chrome最新版本有这个问题,不知道咋回事
把表格的 border-collapse给改了就好了
应该是跟滚动条有关,滚动条宽度改小也可以
表格疯狂计算宽度
.el-table__header,.el-table__body,.el-table__footer{
border-collapse: collapse!important;
}

All 6 comments

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

Windows 7/Chrome 75.0.3770.90

Vue version

2.6.10

Reproduction Link

Https://codepen.io/anon/pen/ydOvRd

Steps to reproduce

  1. Open the Reproduction Link on Windows System

  2. Look at the table

    What is Expected?

ElTable does not shake

What is actually happening?

The table wobbles at certain widths (usually when the scroll bar is about to appear) and can't stop at all.

Attach screenshot for your information
ElTable shake

我也遇到了同样的问题
el-table__body 的 width 不停被设置
导致表格抖动

chrome最新版本有这个问题,不知道咋回事
把表格的 border-collapse给改了就好了
应该是跟滚动条有关,滚动条宽度改小也可以
表格疯狂计算宽度
.el-table__header,.el-table__body,.el-table__footer{
border-collapse: collapse!important;
}

我这儿设置border-collapse不管用
后来将表格外层元素的width宽度减去滚动条的宽度就解决了
类似这样:

<div :style={width: `calc(100% - ${scrollbarWidth})`}>
    <el-table/>
</div>
Was this page helpful?
0 / 5 - 0 ratings