mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user