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); } },