mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-21 22:09:16 +08:00
fix popup
This commit is contained in:
parent
837d5249c0
commit
7f6d7a24dd
@ -9,6 +9,8 @@ import ZanUI from '../src/index';
|
|||||||
|
|
||||||
import '../packages/zanui-css/src/index.css';
|
import '../packages/zanui-css/src/index.css';
|
||||||
|
|
||||||
|
import { Dialog } from '../src/index';
|
||||||
|
console.log(Dialog);
|
||||||
Vue.use(ZanUI);
|
Vue.use(ZanUI);
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
Vue.component('side-nav', SideNav);
|
Vue.component('side-nav', SideNav);
|
||||||
|
@ -85,7 +85,6 @@ export default {
|
|||||||
|
|
||||||
const dom = getDOM(this.$el);
|
const dom = getDOM(this.$el);
|
||||||
const props = merge({}, this, options);
|
const props = merge({}, this, options);
|
||||||
const overlay = props.overlay;
|
|
||||||
const zIndex = props.zIndex;
|
const zIndex = props.zIndex;
|
||||||
|
|
||||||
// 如果属性中传入了`zIndex`,则覆盖`PopupManager`中对应的`zIndex`
|
// 如果属性中传入了`zIndex`,则覆盖`PopupManager`中对应的`zIndex`
|
||||||
@ -94,7 +93,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 如果显示遮罩层
|
// 如果显示遮罩层
|
||||||
if (overlay) {
|
if (this.overlay) {
|
||||||
if (this.closing) {
|
if (this.closing) {
|
||||||
PopupManager.closeModal(this._popupId);
|
PopupManager.closeModal(this._popupId);
|
||||||
this.closing = false;
|
this.closing = false;
|
||||||
@ -102,7 +101,7 @@ export default {
|
|||||||
PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), dom);
|
PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), dom);
|
||||||
|
|
||||||
// 如果滚动时需要锁定
|
// 如果滚动时需要锁定
|
||||||
if (props.lockOnScroll) {
|
if (this.lockOnScroll) {
|
||||||
// 将原来的`bodyOverflow`存起来
|
// 将原来的`bodyOverflow`存起来
|
||||||
if (!this.bodyOverflow) {
|
if (!this.bodyOverflow) {
|
||||||
this.bodyOverflow = document.body.style.overflow;
|
this.bodyOverflow = document.body.style.overflow;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user