Merge pull request #405 from Leopoldthecoder/master

add lock modifier on loading
pull/433/head
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 ### 1.0.0-rc.7
*2016-10-13* *2016-10-13*

View File

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

View File

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