5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

elementUIでダイアログのマスクがダイアログより上に来る

Posted at

結論

el-dialog要素に:modal-append-to-body="false"属性を付与する

何が起こっているのか

elementUIのmodalでは通常body要素内にマスク用の要素を追加しています。
そのため階層が違うコンポーネント内でmodalを呼び出すとスタックコンテキストの影響によりmodalがマスクの後ろに行ってしまいます。
modal-append-to-bodyをfalseにすることでダイアログ要素の親要素にmodalを追加します

参考
https://qiita.com/hoto17296/items/42e62989193504d512c7
https://github.com/ElemeFE/element/issues/3770

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?