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

[Bug Report] el-dialog每次打开后,z-index会自增 #19412

Closed
wildcatDownstairs opened this issue May 14, 2020 · 3 comments
Closed

[Bug Report] el-dialog每次打开后,z-index会自增 #19412

wildcatDownstairs opened this issue May 14, 2020 · 3 comments

Comments

@wildcatDownstairs
Copy link

wildcatDownstairs commented May 14, 2020

Element UI version

2.13.1

OS/Browsers version

Microsoft Edge 版本 81.0.416.68 (官方内部版本) (64 位)

Vue version

2.6.x

Reproduction Link

https://codepen.io/nachen/pen/GRpXJQa

Steps to reproduce

反复打开关闭el-dialog,观察控制台该DOM的z-index的变化

What is Expected?

z-index 的值保持不变

What is actually happening?

每次打开el-dialog,其 z-index = 2

@yft
Copy link

yft commented May 14, 2020

这是特意做的效果,为了让后来打开的dialog浮层可以在最上面

@mikechen7
Copy link

明白特效的用意,但是会有一些特殊场景需要,保证dialog销毁层级的递增,否则在dialog上面需要限制层级的场景就会出现问题,这个是否可以属性字段控制呢?使其每次打开或者关闭时不进行递增2个层级呢?

@zzlit
Copy link

zzlit commented Apr 20, 2021

@PythonNaChen 是的,就好像dialog里面需要使用el-image预览图片,使用el-image的z-index固定住的话总可能会有问题,希望能加一个属性用来控制这个自增的行为。

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