美文网首页
获取当前最大z-index

获取当前最大z-index

作者: 麦芽蕊 | 来源:发表于2019-02-22 17:33 被阅读0次

[...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)

在element-ui中,可以统一使用PopupManager管理

import { PopupManager } from 'element-ui/lib/utils/popup'

PopupManager.nextZIndex()

相关文章

网友评论

      本文标题:获取当前最大z-index

      本文链接:https://www.haomeiwen.com/subject/faoeyqtx.html