Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打开多个弹窗,会出现层级问题 #120

Open
WeiHs223 opened this issue Mar 30, 2021 · 4 comments
Open

打开多个弹窗,会出现层级问题 #120

WeiHs223 opened this issue Mar 30, 2021 · 4 comments

Comments

@WeiHs223
Copy link

No description provided.

@WeiHs223 WeiHs223 changed the title 打开对个弹窗,会出现层级问题 打开多个弹窗,会出现层级问题 Mar 30, 2021
@zuoyanart
Copy link
Owner

请再详细描述下

@WeiHs223
Copy link
Author

WeiHs223 commented Apr 7, 2021

就是我在打开了一个弹窗之后,在这个弹窗基础上,再写一个弹窗,称为二级弹窗,然后在一级弹窗里面点开二级弹窗之后,最小化一下浏览器再恢复,这个时候一级弹窗的index就把二级的弹窗给覆盖掉了

@cilfm
Copy link

cilfm commented Oct 31, 2022

图片

@XiongBox
Copy link

Image
需要支持外部传入zIndex参数,自定义层级。
getBaseStyle: function getBaseStyle() {
//获取z-index
this.resetZIndex();
var op = this.options;
var styleBase = {
left: op.offset[0] + "px",
top: op.offset[1] + "px",
margin: op.offset[2],
// 自定义zIndex
zIndex: op.zIndex || this.zindex,
width: helper_helper.evenNumber(op.area[0]),
height: helper_helper.evenNumber(op.area[1]),
overflow: 'hidden'
};
var a = helper_helper.deepClone(styleBase);
return this.mergeJson(a, this.addStyle);
}

this.$layer.iframe({
content: {
content: xxx
parent: this,
data: {
},
},
zIndex: 200, // 设置z-index值
area: ['95%', '90%'],
title: titleName
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants