[Bug] 表格框选bug:当鼠标按住移动到表格外部松开导致的框选逻辑问题
Open
@yzh505 is already working on this.
Since May 22, 2025.
bug
good first issue
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
Version
"@visactor/vue-vtable": "^1.18.3"
Link to Minimal Reproduction
https://visactor.com/vtable/demo/interaction/select
Steps to Reproduce
鼠标按住某单元格移动到表格外部松开,松开状态下,鼠标移动到表格内,会发现,单元格也被选中了,此时单击某个单元格,保留选区,然后调用getSelectedCellInfos,会发现结果并不是所有被框选的单元格数据,而是会丢失一些
Current Behavior
https://github.com/user-attachments/assets/8cfe1f07-6a8f-43d1-bdb6-50acaf719837
这里的操作是按住 王天科 然后鼠标移动到表格外(比如姓名的上面),再松开鼠标,鼠标移动到孙云清,然后调用getSelectedCellInfos,此时只打印出王天科到孙云清的数据,第一行的数据没了。(鼠标到孙云清之后单击一下,保留选区,然后调用getSelectedCellInfos)
Expected Behavior
期望的是getSelectedCellInfos返回所有被框选的单元格数据
Environment
- OS:Ubuntu 24.04.2 LTS
- Browser:Microsoft Edge,版本 135.0.3179.73 (正式版本) (64 位)
- Framework:"vue": "^3.5.13"
Any additional comments?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.