add lock modifier on loading

pull/405/head
Leopoldthecoder 2016-10-13 20:05:42 +08:00
parent a14824296b
commit d5620b0994
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';