Added .p-fileupload-highlight class

pull/4130/head
Diego 2023-07-12 19:03:07 +02:00
parent 487c2375f6
commit b9e61eaf43
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

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