Refactored BlockUI

pull/5677/head
Cagatay Civici 2024-04-08 15:01:20 +03:00
parent 68960d68c6
commit 5b7d358928
3 changed files with 9 additions and 8 deletions

View File

@ -32,10 +32,10 @@ export default {
}, },
methods: { methods: {
block() { block() {
let styleClass = 'p-blockui p-component-overlay p-component-overlay-enter'; let styleClass = 'p-blockui-mask p-component-overlay p-component-overlay-enter';
if (this.fullScreen) { if (this.fullScreen) {
styleClass += ' p-blockui-document'; styleClass += ' p-blockui-mask-document';
this.mask = DomHandler.createElement('div', { this.mask = DomHandler.createElement('div', {
style: { style: {

View File

@ -1,7 +1,7 @@
import BaseStyle from 'primevue/base/style'; import BaseStyle from 'primevue/base/style';
const classes = { const classes = {
root: 'p-blockui-container' root: 'p-blockui'
}; };
export default BaseStyle.extend({ export default BaseStyle.extend({

View File

@ -1,17 +1,18 @@
export default { export default {
css: ({ dt }) => ` css: ({ dt }) => `
.p-blockui { .p-blockui {
border-radius: ${dt('rounded.base')};
}
.p-blockui-container {
position: relative; position: relative;
} }
.p-blockui.p-component-overlay { .p-blockui-mask {
border-radius: ${dt('rounded.base')};
}
.p-blockui-mask.p-component-overlay {
position: absolute; position: absolute;
} }
.p-blockui-document.p-component-overlay { .p-blockui-mask-document.p-component-overlay {
position: fixed; position: fixed;
} }
` `