Browse Source

无JIRA任务 获取数据后渲染页面loading效果

es6
Young 6 years ago
parent
commit
0db14eb752
  1. 29
      demo/js/config/demo.pane.js
  2. 42
      dist/bundle.ie.js
  3. 24
      dist/bundle.ie.min.js
  4. 42
      dist/bundle.js
  5. 2
      dist/bundle.min.css
  6. 24
      dist/bundle.min.js
  7. 42
      dist/case.js
  8. 55
      dist/demo.js
  9. 42
      dist/fineui.ie.js
  10. 22
      dist/fineui.ie.min.js
  11. 42
      dist/fineui.js
  12. 2
      dist/fineui.min.css
  13. 22
      dist/fineui.min.js
  14. 42
      dist/fineui_without_jquery_polyfill.js
  15. 2
      dist/utils.min.js
  16. 43
      src/case/loading/loading_pane.js

29
demo/js/config/demo.pane.js

@ -0,0 +1,29 @@
/**
* author: young
* createdDate: 2018/11/30
* description:
*/
!(function () {
var Pane = BI.inherit(BI.LoadingPane, {
props: {
},
loadedRender: function () {
return {
type: "bi.center_adapt",
items: [{
type: "bi.label",
text: "this is pane center"
}]
};
},
reqInitData: function (callback) {
setTimeout(function () {
callback();
}, 3000);
}
});
BI.shortcut("demo.pane", Pane);
})();

42
dist/bundle.ie.js vendored

@ -57185,6 +57185,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

24
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/bundle.js vendored

@ -57589,6 +57589,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/case.js vendored

@ -7973,6 +7973,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

55
dist/demo.js vendored

@ -3498,7 +3498,35 @@ Demo.COMPONENT_CONFIG = [{
pId: 1,
text: "Pane(继承)",
value: "demo.pane"
}];// 定义Model路由
}];/**
* author: young
* createdDate: 2018/11/30
* description:
*/
!(function () {
var Pane = BI.inherit(BI.LoadingPane, {
props: {
},
loadedRender: function () {
return {
type: "bi.center_adapt",
items: [{
type: "bi.label",
text: "this is pane center"
}]
};
},
reqInitData: function (callback) {
setTimeout(function () {
callback();
}, 3000);
}
});
BI.shortcut("demo.pane", Pane);
})();// 定义Model路由
var modelRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "index"
@ -6130,30 +6158,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
};
}
});
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
BI.shortcut("demo.htape", Demo.HtapeLayout);/**
* Created by User on 2017/3/22.
*/
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

42
dist/fineui.ie.js vendored

@ -57430,6 +57430,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

22
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/fineui.js vendored

@ -57834,6 +57834,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

22
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/fineui_without_jquery_polyfill.js vendored

@ -40847,6 +40847,48 @@ BI.SortList = BI.inherit(BI.Widget, {
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

43
src/case/loading/loading_pane.js

@ -0,0 +1,43 @@
/**
* author: young
* createdDate: 2018/12/18
* description: 实现先loading 然后再渲染解决beforeInit中loading无效
* 继承此类你需要明确你的页面是根据动态请求后的结果来渲染的
* 使用1在子类中使用loadedRender代替render方法2请求数据放到reqInitData中
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
BI.Pane.superclass._mount.apply(this, arguments);
if (this.isMounted()) {
this.loading();
this.reqInitData(BI.bind(this.__loaded, this));
}
},
render: function () {
return {
type: "bi.default"
};
},
/**
* 子类用loadedRender代替原先的render方法
*/
loadedRender: function () {
return {
type: "bi.default"
};
},
reqInitData: function (callback) {
BI.isFunction(callback) && callback();
},
__loaded: function () {
this.loaded();
BI.createWidget(this.loadedRender(), {
element: this
}, this);
}
});
Loading…
Cancel
Save