Fixed #182 - Style classes are not rendered correctly on Dialog

pull/193/head
mertsincan 2020-02-03 10:25:08 +03:00
parent 20209b8a06
commit 82e6ddf102
1 changed files with 7 additions and 4 deletions

View File

@ -162,14 +162,17 @@ export default {
},
removeStylesFromMask() {
if (this.$refs.mask) {
this.dialogClasses = this.$vnode.data.class;
this.dialogStyles = this.$vnode.data.style;
DomHandler.removeClass(this.$refs.mask, this.$vnode.data.class);
if (this.$vnode.data.style) {
Object.keys(this.$vnode.data.style).forEach((key) => {
if (this.dialogStyles) {
Object.keys(this.dialogStyles).forEach((key) => {
this.$refs.mask.style[key] = '';
});
}
this.dialogClasses = this.$vnode.data.class || this.$vnode.data.staticClass;
if (this.dialogClasses) {
this.$refs.mask.classList = 'p-dialog-wrapper' + (this.modal && ' p-component-overlay p-dialog-mask p-fadein');
}
}
}
},