mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #4129
This commit is contained in:
parent
8a337acdde
commit
d50ebae1e5
50 changed files with 216 additions and 30 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue