This commit is contained in:
Tuğçe Küçükoğlu 2023-08-18 13:43:15 +03:00
parent 8a337acdde
commit d50ebae1e5
50 changed files with 216 additions and 30 deletions

View file

@ -60,6 +60,7 @@ import UploadIcon from 'primevue/icons/upload';
import Message from 'primevue/message';
import ProgressBar from 'primevue/progressbar';
import Ripple from 'primevue/ripple';
import { DomHandler } from 'primevue/utils';
import BaseFileUpload from './BaseFileUpload.vue';
import FileContent from './FileContent.vue';
@ -265,7 +266,7 @@ export default {
},
onDragOver(event) {
if (!this.disabled) {
this.$refs.content.classList.add('p-fileupload-highlight');
DomHandler.addClass(this.$refs.content, 'p-fileupload-highlight');
this.$refs.content.setAttribute('data-p-highlight', true);
event.stopPropagation();
event.preventDefault();
@ -273,12 +274,13 @@ export default {
},
onDragLeave() {
if (!this.disabled) {
this.$refs.content.classList.remove('p-fileupload-highlight');
DomHandler.removeClass(this.$refs.content, 'p-fileupload-highlight');
this.$refs.content.setAttribute('data-p-highlight', false);
}
},
onDrop(event) {
if (!this.disabled) {
DomHandler.removeClass(this.$refs.content, 'p-fileupload-highlight');
this.$refs.content.setAttribute('data-p-highlight', false);
event.stopPropagation();
event.preventDefault();