-
Notifications
You must be signed in to change notification settings - Fork 383
feat(upload): expand the scope of the click event of draggable to the entire card area
#3614
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
Conversation
… to the entire card area
|
tdesign-vue2-demo-compiler-2-6 commit: |
|
/update-snapshot |
|
⏳ 正在运行快照更新。。。 CI: Open |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR expands the click area for the upload trigger when theme="display" so that clicking anywhere on the card initiates the upload.
- Introduces a
canTriggerUploadcomputed property to determine when upload can be triggered - Refactors
getContentto use the new computed guard and removes inlineonClickfrom the trigger element - Adds a
handleDraggerClickmethod and attachesonClickto the top-level dragger container
Comments suppressed due to low confidence (1)
src/upload/themes/dragger-file.tsx:225
- Add unit tests for
handleDraggerClickandcanTriggerUploadunder different file states to ensure clicks only trigger uploads in the intended scenarios.
handleDraggerClick(e: MouseEvent) {
… checked correctly
|
/update-snapshot |
|
⏳ 正在运行快照更新。。。 CI: Open |
|
/update-snapshot |
|
⏳ 正在运行快照更新。。。 CI: Open |
theme="display" to the entire card areadraggable to the entire card area
…he entire card area (#3614) * fix(upload): expand the scope of the click event of `theme="display"` to the entire card area * fix(upload): update `canTriggerUpload` logic to ensure file status is checked correctly * chore: update snapshot * chore: revert change * fix(Dragger): rename canTriggerUpload to hasActiveFile for clarity --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Uyarn <[email protected]>
* chore: fix live demo and guide (#3649) * fix(date-picker): handle tag removal for week and quarter modes (#3653) * fix(date-picker): handle tag removal for week and quarter modes * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(date-picker): improve date processing logic for multiple selections (#3658) * fix(date-picker): improve date processing logic for multiple selections * fix(date-picker): add multiple prop to panel for consistent behavior * fix(popup): outside click not closing when initially `visible=true` (#3659) * fix(ColorPicker): reduce multiple color conversions to minimize errors (#3661) * fix: reduce multiple color conversions to minimize errors * refactor: correct color assignment in slider * fix: use correct props * chore: update snapshots * fix: use optional chaining to prevent errors when systemColors is null in gradient mode * docs: update labels for clarity in color picker panel * chore: update snapshots * chore: remove unused togglePopup prop * fix(image-viewer): update open handler to accept index parameter for image preview (#3670) * fix(hooks): improve code readability and safety in scroll calculations (#3669) * feat(Icon): upgrade tdesign-icons-vue to 0.3.6 (#3672) * fix(alert): add closeBtn API and set close as deprecated (#3631) closes #3630 * chore: remove invalid attribute (#3638) * chore: remove invalid attribute * chore: fix lint * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(cascader): fix value-type="full", value is undefined error (#3622) * fix(menu): fix submenu parent item active status on mounted (#3675) * fix(menu): fix submenu parent item active status on mounted * chore: update snapshot * refactor(Statistic): change color attribute type to string and update docs description (#3671) * refactor(Statistic): change color attribute type to string and update docs description * test(Statistic): add tests for trend increase and decrease icons * chore: update snapshot * feat(Statistic): add color prop tests and update documentation for color styles * fix(tests): update import path for COLOR_MAP in Statistic tests * test(Statistic): refactor colorKeys test to check style attribute instead of contentStyle * chore: update snapshot * chore: update settings.json * docs: 更新颜色风格描述,明确支持深浅色模式切换 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat(QRCode): add QRCode Component (#3652) * feat: docs & type & prop * feat: add QRCode * fix: test * fix: lint * chore: update snapshot * chore: p * chore: slot * chore: optimize * chore: optimize * chore: optimize * chore: optimize * fix: lint * chore: update snapshot * chore: update * chore: update coverage * chore: update common * chore: update demo --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wū yāng <[email protected]> * fix(tree): add `title` for checkable items (#3633) * fix(tree): add `title` to checkable items * chore: update snapshot --------- Co-authored-by: Uyarn <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat(upload): expand the scope of the click event of `draggable` to the entire card area (#3614) * fix(upload): expand the scope of the click event of `theme="display"` to the entire card area * fix(upload): update `canTriggerUpload` logic to ensure file status is checked correctly * chore: update snapshot * chore: revert change * fix(Dragger): rename canTriggerUpload to hasActiveFile for clarity --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Uyarn <[email protected]> * docs: update getting-started (#3678) * docs: update getting-started * chore: update volar * docs(alert): usage example moved to closeBtn (#3676) * docs(alert): usage example moved to closeBtn * chore: update snapshot --------- Co-authored-by: Uyarn <[email protected]> * chore: release 1.13.0 (#3677) * chore: release 1.13.0 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: update new components * chore: fix lint * chore: fix lint * chore: fix lint * chore: update snapshot --------- Co-authored-by: betavs <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 阿菜 Cai <[email protected]> Co-authored-by: Rylan <[email protected]> Co-authored-by: TDesign bot <[email protected]> Co-authored-by: ngyyuusora <[email protected]> Co-authored-by: liweijie0812 <[email protected]> Co-authored-by: Wesley <[email protected]>

🤔 这个 PR 的性质是?
🔗 相关 Issue
sync Tencent/tdesign-vue-next#5575
💡 需求背景和解决方案
📝 更新日志
feat(Upload): 扩大
draggable的点击事件触发热区至整个卡片区域本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单