Open
Conversation
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds draggable functionality to the Upload component, allowing users to reorder uploaded files through drag-and-drop interactions on both desktop and mobile devices.
Changes:
- Added
draggableprop and drag/drop event handlers to enable file reordering - Implemented a new
useDraghook to manage drag state and perform grid-based sorting calculations - Updated documentation to reflect new draggable API and related events
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/upload/upload.tsx | Integrated drag handlers, added TransitionGroup for animations, and wired drag events to props |
| src/upload/upload.md | Added documentation for draggable prop and drag/drop events (Chinese) |
| src/upload/upload.en-US.md | Added documentation for draggable prop and drag/drop events (English) |
| src/upload/type.ts | Added TypeScript definitions for draggable prop, drag/drop callbacks, and 'sort' trigger type |
| src/upload/props.ts | Added prop definitions for draggable, onDrag, and onDrop |
| src/upload/hooks/useUpload.ts | Exported setUploadValue and added UseUpload interface for type safety |
| src/upload/hooks/useDrag.ts | New hook implementing drag-and-drop logic with grid-based positioning |
| src/upload/demos/multiple.vue | Enabled draggable in demo |
| src/upload/test/snapshots/demo.test.jsx.snap | Updated snapshots to reflect draggable attributes in rendered output |
| src/image/image.tsx | Added onClick prop support for Image component |
| src/_common | Updated subproject commit reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
anlyyao
reviewed
Mar 24, 2026
anlyyao
reviewed
Mar 24, 2026
Collaborator
Author
|
/update-snapshot |
Contributor
|
⏳ 正在运行快照更新。。。 CI: Open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
fix #1903
相关 PRs
TDesignOteam/tdesign-api#811
Tencent/tdesign-common#2414
💡 需求背景和解决方案
📝 更新日志
feat(Upload): 新增
draggable属性,支持拖拽排序本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单