element icon indicating copy to clipboard operation
element copied to clipboard

dialog modal layer disappear with vue 2.2.1

Open acathur opened this issue 9 years ago • 7 comments

vue 2.2.1 element-ui 1.2.1

acathur avatar Feb 28 '17 06:02 acathur

Will be fixed in 1.2.2

Leopoldthecoder avatar Feb 28 '17 07:02 Leopoldthecoder

not fixed!

========== sorry, 在升级到 1.2.2 之后,之前没有问题的 dialog 被 modal 遮住了(z-index值正常,是 modal + 1)。不能确定是什么原因。 刚又仔细查找了一下,将上层一个 absolute 层的 z-index 取消后正常了。

已经确定这个 z-index 值从项目就建立起就在,冲突原因未知。

transtone avatar Mar 01 '17 08:03 transtone

@transtone I'm sure it's fixed since version 1.2.2

Leopoldthecoder avatar Mar 01 '17 09:03 Leopoldthecoder

@transtone 试试在 el-dialog 标签上加 :modal-append-to-body="false"

Leopoldthecoder avatar Mar 01 '17 11:03 Leopoldthecoder

@pz25925 http://jsfiddle.net/leopoldthecuber/4fxfq4km/

Leopoldthecoder avatar Mar 01 '17 11:03 Leopoldthecoder

tks. it work

pengzhen-developer avatar Mar 01 '17 11:03 pengzhen-developer

如果你的 dialog 包含在一个 position:relative/absolute 的父层里, 那么 即使它的z-index 比 追加在 body 底部 的 v-modal的z-index 高,

依然会被后面的层挡住。因为这个最后追加的 v-modal 层的z-index 比这个父层的z-index 要高。

<div style="position:relative; z-index:99"><el-dialog  > 虽然我的z-index=2001 我仍将被遮挡 </el-dialog></div>
<div class="v-modal" style="z-index:2000"></div>
</body>

trancelover avatar Mar 07 '17 09:03 trancelover