[new feature]Popup: 增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式 (#343)
* 增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式 * Revert "增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式" This reverts commit 3ae02a0f103595cb0c93e6a0f422c63fe363b129. * 增加遮罩层overlayClass和overlayStyle属性,以提供遮罩层自定义样式
This commit is contained in:
@@ -28,6 +28,16 @@ export default {
|
||||
preventScroll: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 遮罩层额外样式
|
||||
overlayStyle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 遮罩层额外类
|
||||
overlayClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -98,7 +108,13 @@ export default {
|
||||
}
|
||||
|
||||
if (this.overlay) {
|
||||
manager.openModal(this._popupId, context.plusKeyByOne('zIndex'), this.$el);
|
||||
manager.openModal({
|
||||
id: this._popupId,
|
||||
zIndex: context.plusKeyByOne('zIndex'),
|
||||
dom: this.$el,
|
||||
extraClass: this.overlayClass,
|
||||
extraStyle: this.overlayStyle
|
||||
});
|
||||
if (this.lockOnScroll) {
|
||||
document.body.classList.add('van-overflow-hidden');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user