修复新版旋转loading会向左移动一下的bug

pull/67/head
fanyushun 2018-10-31 20:47:33 +08:00
parent 5be427315d
commit 6ce4b19efe
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ layer致力于打造国内最盛行的弹层组件为web开发提供强劲动
## 二次开发 ## 二次开发
主要是对移动版的 `layer` 增加一些自己需要的功能,[点击体验](https://fxss5201.github.io/layer/) 主要是对移动版的 `layer` 增加一些自己需要的功能,[点击体验](https://fxss5201.github.io/layer/)
1. loading 增加了多种新的样式,只需要在原有的 `layer.open` 基础上参数上设置 `loadingType` 参数就可以调用新的 loading 样式 1. loading 增加了多种新的样式,只需要在原有的 `layer.open` 基础上参数上设置 `loadingType` 参数就可以调用新的 loading 样式
* `loadingType: 1`:全页面的新 loading * `loadingType: 1`:全页面的新 loading,引用此请设置 `anim: false`,否则会导致 loading 向左移动一下
* `loadingType: 2`:全页面的 loading 成功样式 * `loadingType: 2`:全页面的 loading 成功样式
* `loadingType: 3`:全页面的 loading 失败样式 * `loadingType: 3`:全页面的 loading 失败样式
* `loadingType: 4`:小区域的新 loading * `loadingType: 4`:小区域的新 loading,引用此请设置 `anim: false`,否则会导致 loading 向左移动一下
* `loadingType: 5`:小区域的 loading 成功样式 * `loadingType: 5`:小区域的 loading 成功样式
* `loadingType: 6`:小区域的 loading 失败样式 * `loadingType: 6`:小区域的 loading 失败样式

View File

@ -56,7 +56,7 @@
layer.open({type: 2, content: '数据加载中...'}); layer.open({type: 2, content: '数据加载中...'});
}); });
$("#loading1").on("click", function(){ $("#loading1").on("click", function(){
layer.open({type: 2, loadingType: 1, content: '数据加载中...'}); layer.open({type: 2, loadingType: 1, content: '数据加载中...', anim: false});
}); });
$("#loading2").on("click", function(){ $("#loading2").on("click", function(){
layer.open({type: 2, loadingType: 2, content: '数据获取成功'}); layer.open({type: 2, loadingType: 2, content: '数据获取成功'});
@ -65,7 +65,7 @@
layer.open({type: 2, loadingType: 3, content: '数据获取失败'}); layer.open({type: 2, loadingType: 3, content: '数据获取失败'});
}); });
$("#loading4").on("click", function(){ $("#loading4").on("click", function(){
layer.open({type: 2, loadingType: 4, content: '数据加载中...'}); layer.open({type: 2, loadingType: 4, content: '数据加载中...', anim: false});
}); });
$("#loading5").on("click", function(){ $("#loading5").on("click", function(){
layer.open({type: 2, loadingType: 5, content: '数据获取成功'}); layer.open({type: 2, loadingType: 5, content: '数据获取成功'});