Added .p-fileupload-highlight class
parent
487c2375f6
commit
b9e61eaf43
|
@ -14,6 +14,13 @@ const styles = `
|
||||||
left: 0;
|
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 {
|
.p-button.p-fileupload-choose {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -265,6 +265,7 @@ export default {
|
||||||
},
|
},
|
||||||
onDragOver(event) {
|
onDragOver(event) {
|
||||||
if (!this.disabled) {
|
if (!this.disabled) {
|
||||||
|
this.$refs.content.classList.add('p-fileupload-highlight');
|
||||||
this.$refs.content.setAttribute('data-p-highlight', true);
|
this.$refs.content.setAttribute('data-p-highlight', true);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -272,6 +273,7 @@ export default {
|
||||||
},
|
},
|
||||||
onDragLeave() {
|
onDragLeave() {
|
||||||
if (!this.disabled) {
|
if (!this.disabled) {
|
||||||
|
this.$refs.content.classList.remove('p-fileupload-highlight');
|
||||||
this.$refs.content.setAttribute('data-p-highlight', false);
|
this.$refs.content.setAttribute('data-p-highlight', false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue