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] fix sibling column resizable does not work #2335

Merged
merged 6 commits into from
Apr 20, 2023

Conversation

chuyueZhang
Copy link
Contributor

@chuyueZhang chuyueZhang commented Apr 14, 2023

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

💡 需求背景和解决方案

问题如下:

  1. 左侧固定列单列设置fixed和resizable=false时,固定列与相邻列之间仍然能够在拖动调整列宽时出现辅助线
  2. 表头中两列之间相交处拖动调整列宽时,鼠标拖动其实位置在相交处的左侧和右侧对列宽调整限制不一致
    如下图所示,在鼠标起始位置在相交处右侧时,左侧列的列宽限制被按照右侧列的min-width,max-width属性值进行处理

image

修复内容如下:

  1. 传参值由effectNextCol改成effectPrevCol

image

2. 通过dataset.colkey === col.colkey判断鼠标拖动起始位置是否在相交线的左侧,根据起始位置在左侧还是右侧进行不同处理

image

📝 更新日志

  1. 左侧固定列单列设置fixed和resizable=false时,固定列与相邻resizable=true的列之间在拖动调整列宽时不出现辅助线
  2. 表头中两列之间相交处拖动调整列宽时,鼠标拖动起始位置在相交处的左侧和右侧时不影响辅助线能够拖动的最左侧和最右侧的位置
  • fix(table): 修复table组件在开启固定列单列resizable禁用时,相邻resizable启用的列列宽调整范围与预期不一致的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

完成

@chaishi chaishi changed the title Fix table 20230414 [Table] fix sibling column resizable does not work Apr 20, 2023
@chaishi chaishi merged commit bac3e53 into Tencent:develop Apr 20, 2023
5 checks passed
@github-actions github-actions bot mentioned this pull request Apr 20, 2023
KMethod pushed a commit to KMethod/tdesign-vue that referenced this pull request Aug 25, 2023
* fix(table): 修复table组件激活左侧固定列时拖拽异常的问题

* fix(table): 修复table组件在拖拽使横向滚动条隐现后列宽无法正常调整的问题

* fix(table): 修复table组件在开启多级表头时点击子表头后控制台报错的问题

* fix(table): 修复table组件在开启固定列单列resizable禁用时,相邻resizable启用的列列宽调整范围与预期不一致的问题

* chore(table): 代码cr简化
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants