增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式

This commit is contained in:
mickey mai
2017-11-23 19:08:38 +08:00
parent a6a59e6bc7
commit 3ae02a0f10

View File

@@ -28,7 +28,15 @@ export default {
preventScroll: {
type: Boolean,
default: false
}
},
overlayClass: {
type: String,
default: ''
},
overlayStyle: {
type: String,
default: ''
},
},
watch: {
@@ -104,6 +112,8 @@ export default {
}
}
this.$el.style.cssText = this.$el.style.cssText + ` ${this.overlayStyle}`;
this.$el.className = this.$el.className + ` ${this.overlayClass}`;
this.$el.style.zIndex = context.plusKeyByOne('zIndex');
this.opened = true;