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

Fix table column resizable #2324

Merged
merged 4 commits into from
Apr 12, 2023
Merged

Conversation

chuyueZhang
Copy link
Contributor

@chuyueZhang chuyueZhang commented Apr 12, 2023

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

  1. vue 1.2.5版本组件库的table组件,在固定列生效且存在可横向滚动的滚动条时,当开启列拖拽宽度后拖拽使横向滚动条消失,此时拖拽某一列横向不超过后一列时,后一列宽度可以被无限缩小,min-width和max-width不生效
  2. 修复table组件中开启左侧列固定并且固定列配置resizable=false时,拖动此固定列相邻非固定列列宽时控制台报错的问题
    image

image

  1. 修复table组件在开启多级表头时点击子表头后控制台报错的问题
    image

image

💡 需求背景和解决方案

  1. 通过判断控制canResizeSiblingColWidth的值,判断逻辑新增后一列宽度与min-width和max-width的关系
  2. 在左侧有列固定且resizable=false这种情况时进行异常处理不允许拖动相邻列左侧使其能调整宽度
  3. 表头点击时禁止冒泡,防止重复触发列鼠标事件导致报错

📝 更新日志

  • fix(Table): 列宽调整功能,修复即使 resizable=false 时,也会显示拖拽调整列宽图标和辅助线问题

  • fix(Table): 列宽调整功能,修复在拖拽任意列宽使表格横向滚动条消失之后列宽无法正常调整的问题,即支持 resize.minWidth

  • fix(Table): 列宽调整功能,修复开启多级表头时点击子表头后控制台报错的问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2023

完成

@chaishi chaishi merged commit b3ebf58 into Tencent:develop Apr 12, 2023
5 checks passed
@chaishi chaishi changed the title Fix table 20230411 Fix table column resizable Apr 13, 2023
@github-actions github-actions bot mentioned this pull request Apr 13, 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): hide resizable

---------

Co-authored-by: chaishi <974383157@qq.com>
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