From b9e61eaf431e510df45979e6f09984531f794851 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 12 Jul 2023 19:03:07 +0200 Subject: [PATCH 1/2] Added .p-fileupload-highlight class --- components/lib/fileupload/BaseFileUpload.vue | 7 +++++++ components/lib/fileupload/FileUpload.vue | 2 ++ 2 files changed, 9 insertions(+) diff --git a/components/lib/fileupload/BaseFileUpload.vue b/components/lib/fileupload/BaseFileUpload.vue index 503747619..e5bd2df04 100644 --- a/components/lib/fileupload/BaseFileUpload.vue +++ b/components/lib/fileupload/BaseFileUpload.vue @@ -14,6 +14,13 @@ const styles = ` left: 0; } +.p-fileupload-content.p-fileupload-highlight { + border-color: var(--primary-color); + border-width: 2px; + border-style: dashed; + background-color: var(--primary-100); +} + .p-button.p-fileupload-choose { position: relative; overflow: hidden; diff --git a/components/lib/fileupload/FileUpload.vue b/components/lib/fileupload/FileUpload.vue index 3ec3c7894..e421d8b85 100755 --- a/components/lib/fileupload/FileUpload.vue +++ b/components/lib/fileupload/FileUpload.vue @@ -265,6 +265,7 @@ export default { }, onDragOver(event) { if (!this.disabled) { + this.$refs.content.classList.add('p-fileupload-highlight'); this.$refs.content.setAttribute('data-p-highlight', true); event.stopPropagation(); event.preventDefault(); @@ -272,6 +273,7 @@ export default { }, onDragLeave() { if (!this.disabled) { + this.$refs.content.classList.remove('p-fileupload-highlight'); this.$refs.content.setAttribute('data-p-highlight', false); } }, From 6e5a4dbc7efb04f5a7384e9984af390907c97476 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 13 Jul 2023 17:43:14 +0200 Subject: [PATCH 2/2] Removed highlight class --- components/lib/fileupload/BaseFileUpload.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/components/lib/fileupload/BaseFileUpload.vue b/components/lib/fileupload/BaseFileUpload.vue index e5bd2df04..503747619 100644 --- a/components/lib/fileupload/BaseFileUpload.vue +++ b/components/lib/fileupload/BaseFileUpload.vue @@ -14,13 +14,6 @@ const styles = ` left: 0; } -.p-fileupload-content.p-fileupload-highlight { - border-color: var(--primary-color); - border-width: 2px; - border-style: dashed; - background-color: var(--primary-100); -} - .p-button.p-fileupload-choose { position: relative; overflow: hidden;