Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table最小宽度问题 #2460

Closed
1 task
Du-xk opened this issue Jun 19, 2020 · 14 comments
Closed
1 task

table最小宽度问题 #2460

Du-xk opened this issue Jun 19, 2020 · 14 comments

Comments

@Du-xk
Copy link

Du-xk commented Jun 19, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.0

Environment

win10,chrome,1.5.0

Reproduction link

Edit on CodeSandbox

Steps to reproduce

极端条件可复现:因为使用table我们通常会留一列来自适应宽度,在极低分辨率如1024*768 会因为分辨率太低,预留宽度列宽度为0.

What is expected?

建议增加 min-width属性

What is actually happening?

极端条件可复现:因为使用table我们通常会留一列来自适应宽度,在极低分辨率如1024*768 会因为分辨率太低,预留宽度列宽度为0.

@xrkffgg
Copy link
Member

xrkffgg commented Jul 7, 2020

没太明白你想表达啥,min-width 加到哪里?

@Du-xk
Copy link
Author

Du-xk commented Jul 7, 2020

每一列的最小宽度呀,使用表格我们通常会预留一列不设宽度来自适应,如果没有最小宽度,分辨率又特别低,会导致这一列宽度为0,但是如果不预留自适应列全部设置固定宽度,到大分辨率时会出现空白列

@xrkffgg
Copy link
Member

xrkffgg commented Jul 7, 2020

minWidth 这个行吗?

@lotthsiao
Copy link

minWidth不行,啥时候加这个属性啊,这个感觉很重要

@k1ngbanana
Copy link

的确需要这个功能。和楼主遇到一样的问题。因为有固定列,所以如果最后一列不设置宽度的话才能正常显示。不过如果显示屏比较小的时候,那么最后一列width会缩小到看不到。

@chenjibin
Copy link

参考下element-ui table 列宽度配置的minWidth功能 还是挺实用的

@bruin-suen
Copy link

minWidth、maxWidth俩属性很重要的,什么时候加?

@imic07
Copy link

imic07 commented Dec 15, 2020

@tangjinzhou 建议增加一个属性 宽度是否允许自动变化 allowWidthChange:true/false。
功能是:当列设置了width/allowWidthChange=false后, 此列就按照设定的width显示,不要再根据每列的width比例去动态变化。没有设置allowWidthChange的列或者allowWidthChange=true就按照 (当前表格总宽度 - 有allowWidthChange的总宽度)按比例放大。

建议每个列都设定一个width(每列都设定了width可以提高性能),allowWidthChange根据需要设置。

这种设置相对于minWidth、maxWidth 更好理解。

@pang-y
Copy link

pang-y commented Dec 29, 2020

希望支持element-ui 的 min-width (对应列的最小宽度,与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列)

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@wcldyx
Copy link

wcldyx commented Mar 24, 2021

这个功能会加上吗, 有时候我需要固定一个单元格宽度,不想让它等比放大

@changshan2017
Copy link

同问,
minWidth 确实能比较地适配多分辨率适配的实际场景

@qpxtWhite
Copy link

+1

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

12 participants