mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965 - For BlockUI
This commit is contained in:
parent
c8a856dc9e
commit
fee8498a7e
3 changed files with 80 additions and 47 deletions
66
components/lib/blockui/BaseBlockUI.vue
Normal file
66
components/lib/blockui/BaseBlockUI.vue
Normal file
|
@ -0,0 +1,66 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
.p-blockui-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-blockui {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-blockui.p-component-overlay {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.p-blockui-document.p-component-overlay {
|
||||
position: fixed;
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: 'p-blockui-container'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_divider_style', manual: true });
|
||||
|
||||
export default {
|
||||
name: 'BaseAvatar',
|
||||
extends: BaseComponent,
|
||||
props: {
|
||||
blocked: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fullScreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
baseZIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
autoZIndex: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes
|
||||
},
|
||||
watch: {
|
||||
isUnstyled: {
|
||||
immediate: true,
|
||||
handler(newValue) {
|
||||
!newValue && loadStyle();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue