From 7f6d7a24dda66f2177b2ed86acd3bf0b22982605 Mon Sep 17 00:00:00 2001 From: cookfront Date: Tue, 28 Feb 2017 11:55:18 +0800 Subject: [PATCH] fix popup --- docs/index.js | 2 ++ src/mixins/popup/index.js | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.js b/docs/index.js index 8ee82377f..23b8c79ec 100644 --- a/docs/index.js +++ b/docs/index.js @@ -9,6 +9,8 @@ import ZanUI from '../src/index'; import '../packages/zanui-css/src/index.css'; +import { Dialog } from '../src/index'; +console.log(Dialog); Vue.use(ZanUI); Vue.use(VueRouter); Vue.component('side-nav', SideNav); diff --git a/src/mixins/popup/index.js b/src/mixins/popup/index.js index 91d86fed0..7e929d251 100644 --- a/src/mixins/popup/index.js +++ b/src/mixins/popup/index.js @@ -85,7 +85,6 @@ export default { const dom = getDOM(this.$el); const props = merge({}, this, options); - const overlay = props.overlay; const zIndex = props.zIndex; // 如果属性中传入了`zIndex`,则覆盖`PopupManager`中对应的`zIndex` @@ -94,7 +93,7 @@ export default { } // 如果显示遮罩层 - if (overlay) { + if (this.overlay) { if (this.closing) { PopupManager.closeModal(this._popupId); this.closing = false; @@ -102,7 +101,7 @@ export default { PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), dom); // 如果滚动时需要锁定 - if (props.lockOnScroll) { + if (this.lockOnScroll) { // 将原来的`bodyOverflow`存起来 if (!this.bodyOverflow) { this.bodyOverflow = document.body.style.overflow;