popup component

This commit is contained in:
cookfront
2017-02-24 19:26:30 +08:00
parent 75b86832f0
commit 042b286583
3 changed files with 11 additions and 16 deletions
-2
View File
@@ -131,10 +131,8 @@ export default {
setTimeout(() => {
if (this.modal && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
document.body.style.paddingRight = this.bodyPaddingRight;
}
this.bodyOverflow = null;
this.bodyPaddingRight = null;
}, 200);
}
+2 -5
View File
@@ -70,7 +70,7 @@ const PopupManager = {
const modalStack = this.modalStack;
for (let i = 0, j = modalStack.length; i < j; i++) {
for (let i = 0, len = modalStack.length; i < len; i++) {
const item = modalStack[i];
if (item.id === id) {
return;
@@ -79,10 +79,7 @@ const PopupManager = {
const modalDom = getModal();
addClass(modalDom, 'v-modal');
setTimeout(() => {
removeClass(modalDom, 'v-modal-enter');
}, 200);
addClass(modalDom, 'z-modal');
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
dom.parentNode.appendChild(modalDom);