BlockUI: data-pc-section added for mask
parent
53654dd82d
commit
46b0dfb92c
|
@ -33,16 +33,8 @@ export default {
|
||||||
block() {
|
block() {
|
||||||
let styleClass = 'p-blockui p-component-overlay p-component-overlay-enter';
|
let styleClass = 'p-blockui p-component-overlay p-component-overlay-enter';
|
||||||
|
|
||||||
if (this.fullScreen) {
|
|
||||||
styleClass += ' p-blockui-document';
|
|
||||||
this.mask = document.createElement('div');
|
this.mask = document.createElement('div');
|
||||||
!this.isUnstyled && this.mask.setAttribute('class', styleClass);
|
this.mask.setAttribute('data-pc-section', 'mask');
|
||||||
document.body.appendChild(this.mask);
|
|
||||||
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
||||||
document.activeElement.blur();
|
|
||||||
} else {
|
|
||||||
this.mask = document.createElement('div');
|
|
||||||
!this.isUnstyled && this.mask.setAttribute('class', styleClass);
|
|
||||||
DomHandler.addStyles(this.mask, {
|
DomHandler.addStyles(this.mask, {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '0',
|
top: '0',
|
||||||
|
@ -50,6 +42,15 @@ export default {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%'
|
height: '100%'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.fullScreen) {
|
||||||
|
styleClass += ' p-blockui-document';
|
||||||
|
!this.isUnstyled && this.mask.setAttribute('class', styleClass);
|
||||||
|
document.body.appendChild(this.mask);
|
||||||
|
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
||||||
|
document.activeElement.blur();
|
||||||
|
} else {
|
||||||
|
!this.isUnstyled && this.mask.setAttribute('class', styleClass);
|
||||||
this.$refs.container.appendChild(this.mask);
|
this.$refs.container.appendChild(this.mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue