Refactor
parent
b7a7f7ff3c
commit
2211989140
|
@ -77,7 +77,7 @@ export default {
|
||||||
if (!this.mask) {
|
if (!this.mask) {
|
||||||
this.mask = document.createElement('div');
|
this.mask = document.createElement('div');
|
||||||
this.mask.style.zIndex = String(parseInt(this.$refs.container.style.zIndex, 10) - 1);
|
this.mask.style.zIndex = String(parseInt(this.$refs.container.style.zIndex, 10) - 1);
|
||||||
DomHandler.addMultipleClasses(this.mask, 'p-component-overlay p-fadein');
|
DomHandler.addMultipleClasses(this.mask, 'p-component-overlay');
|
||||||
if (this.dismissable) {
|
if (this.dismissable) {
|
||||||
this.bindMaskClickListener();
|
this.bindMaskClickListener();
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ export default {
|
||||||
},
|
},
|
||||||
bindMaskClickListener() {
|
bindMaskClickListener() {
|
||||||
if (!this.maskClickListener) {
|
if (!this.maskClickListener) {
|
||||||
this.maskClickListener = (event) => {
|
this.maskClickListener = () => {
|
||||||
this.hide();
|
this.hide();
|
||||||
};
|
};
|
||||||
this.mask.addEventListener('click', this.maskClickListener);
|
this.mask.addEventListener('click', this.maskClickListener);
|
||||||
|
|
Loading…
Reference in New Issue