-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: 使用 min-1px 库的1像素gif图(base64) * fix: 打开评论管理页面是会被其他元素覆盖在最顶层的bug * fix: 消息弹窗被zIndex拦截的bug * refactor: 移除 message 提示框,改用 msg-alert 库 * build: 1.0.2
- Loading branch information
Showing
8 changed files
with
11,425 additions
and
108 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const str = 'D-zIndex' | ||
|
||
/** | ||
* 让 admin 显示在最顶层 | ||
* @param {String} flag open or close | ||
*/ | ||
export default function (flag) { | ||
const all = [...document.body.querySelectorAll('*:not(._msg)')] | ||
all.forEach((el) => { | ||
const zIndex = window.getComputedStyle(el).zIndex | ||
if (flag === 'close') { | ||
el.classList.remove(str) | ||
el.style.removeProperty('z-index') | ||
return | ||
} | ||
if (flag === 'open' && zIndex > 0) { | ||
el.style.zIndex = -1 | ||
el.classList.add(str) | ||
} | ||
}) | ||
|
||
let body, | ||
el = document.querySelector('#Discuss') | ||
|
||
while (body !== 'BODY') { | ||
el = el.parentElement | ||
body = el.nodeName | ||
if (el.classList.contains(str)) { | ||
el.style.removeProperty('z-index') | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters