Merge pull request #405 from Leopoldthecoder/master

add lock modifier on loading
This commit is contained in:
baiyaaaaa 2016-10-14 23:02:14 +08:00 committed by GitHub
commit 576c21afea
3 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,13 @@
## 更新日志
### 1.0.0-rc.8(待发布)
*2016-XX-XX*
#### 非兼容性更新
- 全屏 Loading 现在默认不再锁定屏幕滚动。如果需要的话,可添加 `lock` 修饰符
### 1.0.0-rc.7
*2016-10-13*

View File

@ -57,14 +57,14 @@
页面数据加载时显示。
:::demo 当需要全屏遮罩时,可使用`fullscreen`修饰符(此时遮罩会插入至 body 上)
:::demo 当需要全屏遮罩时,可使用`fullscreen`修饰符(此时遮罩会插入至 body 上)。此时若需要锁定屏幕的滚动,可以使用`lock`修饰符。
```html
<template>
<el-button
type="primary"
@click.native="openFullScreen"
v-loading.fullscreen="fullscreenLoading">
v-loading.fullscreen.lock="fullscreenLoading">
显示整页加载3 秒后消失
</el-button>
</template>

View File

@ -68,7 +68,7 @@ exports.install = Vue => {
if (directive.originalPosition !== 'absolute') {
parent.style.position = 'relative';
}
if (binding.modifiers.fullscreen) {
if (binding.modifiers.fullscreen && binding.modifiers.lock) {
parent.style.overflow = 'hidden';
}
directive.mask.style.display = 'block';