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

feat(Rate): add clearable prop #3332

Merged
merged 16 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(Upload): fixed vue error on uploadPastedFiles is false
  • Loading branch information
myronliu347 committed Sep 5, 2024
commit d5baa7d4450c18f2c91a2b4a415bff64fb78c944
10 changes: 8 additions & 2 deletions src/upload/upload.tsx
Original file line number Diff line number Diff line change
@@ -94,9 +94,15 @@ export default defineComponent({
},
]);

const handlePasteFileChange = (e: ClipboardEvent) => {
if (props.uploadPastedFiles) {
onPasteFileChange(e);
}
};

return {
...uploadData,
onPasteFileChange,
handlePasteFileChange,
commonDisplayFileProps,
dragProps,
uploadClasses,
@@ -246,7 +252,7 @@ export default defineComponent({

render() {
return (
<div class={this.uploadClasses} onPaste={this.uploadPastedFiles ? this.onPasteFileChange : undefined}>
<div class={this.uploadClasses} onPaste={this.handlePasteFileChange}>
<input
ref="inputRef"
type="file"
Loading