Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.

Home Page:https://happy-coding-clans.github.io/vue-easytable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug Report] 列宽拖动 - 自定义单元格后,向左拖动列宽却在变大

Moxiao514 opened this issue · comments

选择要提交 issue 的库

vue-easytable

Issue 类型

Bug

Issue 标题

列宽拖动 - 自定义单元格后,向左拖动列宽却在变大

仓库版本

v2.27.1

Vue 版本

2.6.11

浏览器

Chrome114.0.5735.199

系统类型

Windows

重现链接

https://codesandbox.io/s/bold-grass-3hhlth

重现步骤

1、renderBodyCell自定义单元格
2、使用列宽拖动属性
3、左右拉动 - 距离不是鼠标离开点 且 向左拖动时列宽仍在变大

期望的结果是什么?

可以正常左右拖动

实际的结果是什么?

列宽变化不符合拖动距离

和自定义单元格没关系。如果列宽不设置,默认是 50px导致。建议给需要拖动的列设置合理的宽度

列加了width还是存在这个问题的呀
image

列加了width还是存在这个问题的呀 image

宽度设置尽量符合真实的宽度。比如实际宽度大概是400px,但是你设置了120px,拖动的时候就会存在误差

当然这也是组件需要优化的,不过目前需要你尽量设置的准确些

Of course, this is also a component that needs to be optimized, but currently, you need to set it as accurately as possible.

I'm facing the same issue and I cannot know beforehand how many columns are there in the table so I cannot accurately assign width as you mentioned.
Any suggestions or workarounds?