VisActor / VisActor/VTable

[Feature] 单元格内容允许进行拖拽

Open
#2,123 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
3.7k
Forks
486
Avg merge
1d 19h
Merged PRs (30d)
16

Description

What problem does this feature solve?

解决单元格内容进行拖拽,即转移数据的问题。
在业务中通常为对已有内容进行修改位置,或从其他地方拖动转入,以获取更加合理的安排计算

What does the proposed API look like?

实现功能

类似excel,对单元格内容进行调整。同时支持其他地方的内容放置到单元格中(即获取鼠标松开事件的单元格)

当前方案

获取鼠标按下与松开事件,修改鼠标样式,同时对hover与移入移出事件做处理,完成拖拽事件

当前方案的不足

hover在鼠标按下状态时无法默认触发(可能需要手动触发)

功能优化

添加API: 添加类excel的小手或move鼠标样式进行允许拖动的操作

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the table's existing mouse-down, mouse-up, hover, and drag-related event handling described in the issue. Define the API for Excel-like cell dragging, including accepting content from elsewhere and the hand or move cursor. Done means cell contents can be repositioned or dropped into the released-on cell with the intended cursor behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.