mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式
This commit is contained in:
@@ -28,7 +28,15 @@ export default {
|
|||||||
preventScroll: {
|
preventScroll: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
|
overlayClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
overlayStyle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
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.$el.style.zIndex = context.plusKeyByOne('zIndex');
|
||||||
this.opened = true;
|
this.opened = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user