fix popup

This commit is contained in:
cookfront 2017-04-05 17:28:39 +08:00
parent 26ed7be5a9
commit afa914942e
3 changed files with 35 additions and 3 deletions

View File

@ -79,7 +79,7 @@ export default {
#### 高级用法
使用具名`slot`自定义内容。
使用`slot`自定义内容。比如在自定义内容中放入一个`zan-card`
:::demo 高级用法
```html

View File

@ -80,6 +80,19 @@ export default {
<img v-lazy="img" alt="">
</zan-swipe-item>
</zan-swipe>
<script>
export default {
data() {
return {
images: [
'https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg',
'https://img.yzcdn.cn/upload_files/2017/03/15/FvexrWlG_WxtCE9Omo5l27n_mAG_.jpeg'
]
};
}
};
</script>
```
:::
@ -94,6 +107,25 @@ export default {
<img v-lazy="img" alt="">
</zan-swipe-item>
</zan-swipe>
<script>
export default {
data() {
return {
autoImages: [
'https://img.yzcdn.cn/upload_files/2017/03/09/FvkZahKoq1vkxLQFdVWeLf2UCqDz.png',
'https://img.yzcdn.cn/upload_files/2017/03/09/Fk0rpe_svu9d5Xk3MUCWd1QeMXOu.png'
]
};
},
methods: {
handlePageEnd(page, index) {
console.log(page, index);
}
}
};
</script>
```
:::

View File

@ -118,7 +118,7 @@ export default {
this.bodyOverflow = document.body.style.overflow;
}
document.body.style.overlay = 'hidden';
document.body.style.overflow = 'hidden';
}
}
@ -139,7 +139,7 @@ export default {
if (this.lockOnScroll) {
setTimeout(() => {
if (this.modal && this.bodyOverflow !== 'hidden') {
if (this.overlay && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
}
this.bodyOverflow = null;