Browse Source

MessageBox: remove hidden class when using MessageBox twice (#11371)

hetech 7 years ago
parent
commit
c9ea4161f1
2 changed files with 2 additions and 2 deletions
  1. 2 1
      src/utils/popup/index.js
  2. 0 1
      test/unit/specs/mixin.vue-popup.spec.js

+ 2 - 1
src/utils/popup/index.js

@@ -69,7 +69,7 @@ export default {
       opened: false,
       bodyPaddingRight: null,
       computedBodyPaddingRight: 0,
-      withoutHiddenClass: false,
+      withoutHiddenClass: true,
       rendered: false
     };
   },
@@ -216,6 +216,7 @@ export default {
         document.body.style.paddingRight = this.bodyPaddingRight;
         removeClass(document.body, 'el-popup-parent--hidden');
       }
+      this.withoutHiddenClass = true;
     }
   }
 };

+ 0 - 1
test/unit/specs/mixin.vue-popup.spec.js

@@ -13,7 +13,6 @@ const Popup = Object.assign({}, VuePopup, {
 describe('Mixin:vue-popup', () => {
   let vm;
   before(() => {
-    document.body.className = '';
     const modals = document.querySelectorAll('.v-modal');
     [].forEach.call(modals, modal => {
       modal &&