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] 设置minWidth并开启resizable时列宽度计算异常 #1428

Closed
cong-min opened this issue Aug 31, 2022 · 6 comments
Closed

[Table] 设置minWidth并开启resizable时列宽度计算异常 #1428

cong-min opened this issue Aug 31, 2022 · 6 comments
Assignees
Labels
to be published fixed, not be published

Comments

@cong-min
Copy link
Contributor

cong-min commented Aug 31, 2022

tdesign-vue 版本

0.46.2

重现链接

https://stackblitz.com/edit/angular-uvuvxf?file=package.json,src%2Fdemo.vue

重现步骤

使用 col minWidth并开启resizable时,会出现两个异常问题:

  1. 初始化时的width计算错误,在minWidth的同时作用下会闪烁:
  2. 拖拽设为minWidth的列时,各列宽度计算异常不受控制

问题1:初始化宽度闪烁

2022-08-31_10-39-22.mp4

image

问题2:拖拽时宽度不受控

(若某列设置了fixed: 'left'异常会更严重一些)

2022-08-31_10-50-52.mp4

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @cong-min,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2022

♥️ 有劳 @realyuyanan @chaishi @cool-518 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @cong-min

@chaishi
Copy link
Collaborator

chaishi commented Aug 31, 2022

关于第 2 个问题,解决方案如下:如果要使用宽度调整,请设置 table-layout: fixed(浏览器不支持 table-layout: auto 的情况下自由控制宽度,auto 意味着浏览器自己把控)

@cong-min
Copy link
Contributor Author

@chaishi 第 2 个问题中默认值就已经是 fixed 了:
image

@ZTao-z
Copy link
Contributor

ZTao-z commented Aug 31, 2022

关于第1个问题,解决方案:目前列宽计算没有使用minWidth限制列最小宽度,需要兼容
关于第2个问题,解决方案:抖动是由于列最小宽度和拖动计算的列宽互相干扰的结果,当计算的列宽小于设置的minWidth,在渲染时会出现抖动
企业微信截图_16619188612182

@xiaosansiji
Copy link
Collaborator

已在 0.46.4 版本修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

4 participants