Element: el-table 在flex的子容器里不会自适应

Created on 7 Mar 2017  ·  9Comments  ·  Source: ElemeFE/element

ElementUI version

1.2.3

OS/Browers version

macOS/Chrome 56

Vue version

2.2.1

Reproduction Link

http://jsfiddle.net/egxa68x1/2/

Steps to reproduce

打开上面的测试地址, 然后拉动中间的分隔条, 左拉时table的宽度会边大, 但是右拉时不会变小

What is Expected?

What is actually happening?

Most helpful comment

table外的div加overflow:hidden;就好了

All 9 comments

flex:1 1 0;而不是flex:auto;

呃, 好像还是不行...

table外的div加overflow:hidden;就好了

这个问题有解决吗?@lincenying

@adntin 看上面 shanlh 的回答...

应该在元素 flex: 1 内再加一个样式 overflow: hidden 就可以解决 @lincenying 谢谢

@lincenying 请问这是框架自身的原因,还是flex布局的原因?

使用overflow:hidden;有点危险,使用min-width:0; 也可以解决这个问题。

为什么按照你们的操作都不行?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akaylh picture akaylh  ·  3Comments

yubo111 picture yubo111  ·  3Comments

FranzSkuffka picture FranzSkuffka  ·  3Comments

Kingwl picture Kingwl  ·  3Comments

fscardua picture fscardua  ·  3Comments