fix ignore allowUpload in file drop

This commit is contained in:
2023-07-11 19:34:07 +10:00
parent 3dfb11d692
commit 56b5dcd7d8

View File

@@ -871,13 +871,13 @@ const computedSelectDisabled = computed(() => {
});
const handleDragEnter = () => {
if (!showFileDrop.value) {
if (props.allowUpload && !showFileDrop.value) {
showFileDrop.value = true;
}
};
const handleDragOver = () => {
if (!showFileDrop.value) {
if (props.allowUpload && !showFileDrop.value) {
showFileDrop.value = true;
}
};
@@ -889,6 +889,10 @@ const handleDragLeave = () => {
};
const handleDrop = (event) => {
if (!props.allowUpload) {
return;
}
showFileDrop.value = false;
handleFilesUpload(event.dataTransfer.files);
showFileBrowserTab();