Skip to content
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

refactor(components): [upload] reuse revkoeObjectURL function #14126

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

HeftyKoo
Copy link
Member

@HeftyKoo HeftyKoo commented Aug 27, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at 46249c1

Refactored upload.vue component to use a shared function for revoking blob URLs of uploaded files. Moved and renamed the function from use-handlers.ts to upload.vue for better readability and reusability.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 46249c1

  • Rename and relocate revokeObjectURL function to revokeFileObjectURL in upload.vue to avoid confusion and improve consistency (link, link, link)
  • Simplify onBeforeUnmount hook in upload.vue to use revokeFileObjectURL function instead of repeating logic (link)
  • Replace revokeObjectURL function with revokeFileObjectURL function in handleRemove method in use-handlers.ts to reflect renaming and relocation (link)

@github-actions
Copy link

github-actions bot commented Aug 27, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Aug 27, 2023
@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14126
Please comment the example via this playground if needed.

@HeftyKoo HeftyKoo merged commit 2b3a34e into dev Aug 28, 2023
13 checks passed
@HeftyKoo HeftyKoo deleted the refactor-upload-revokeObjectURL branch August 28, 2023 02:29
@element-bot element-bot mentioned this pull request Sep 14, 2023
3 tasks
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CommitMessage::Qualified Qualified commit message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants