From 6749f2958ecd77c6b9d2ae0aba46b79d3369e777 Mon Sep 17 00:00:00 2001 From: Young Date: Tue, 18 Dec 2018 15:30:43 +0800 Subject: [PATCH] update --- demo/js/config/demo.pane.js | 2 +- dist/base.js | 25 ------------ dist/bundle.ie.js | 55 ++++++++++++++------------ dist/bundle.js | 55 ++++++++++++++------------ dist/case.js | 7 +--- dist/demo.js | 2 +- dist/fineui.ie.js | 55 ++++++++++++++------------ dist/fineui.js | 55 ++++++++++++++------------ dist/fineui_without_jquery_polyfill.js | 55 ++++++++++++++------------ src/base/pane.js | 25 ------------ src/case/loading/loading_pane.js | 31 +++++++++++++++ 11 files changed, 185 insertions(+), 182 deletions(-) create mode 100644 src/case/loading/loading_pane.js diff --git a/demo/js/config/demo.pane.js b/demo/js/config/demo.pane.js index 19d41644eb..30b2415a71 100644 --- a/demo/js/config/demo.pane.js +++ b/demo/js/config/demo.pane.js @@ -4,7 +4,7 @@ * description: */ !(function () { - var Pane = BI.inherit(BI.Pane, { + var Pane = BI.inherit(BI.LoadingPane, { props: { }, diff --git a/dist/base.js b/dist/base.js index 62788d46cc..ea4f3bd5f9 100644 --- a/dist/base.js +++ b/dist/base.js @@ -218,31 +218,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index f4a72afd1c..e83aacef34 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -35308,31 +35308,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { @@ -57200,6 +57175,36 @@ 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: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +});/** * 有总页数和总行数的分页控件 * Created by Young's on 2016/10/13. */ diff --git a/dist/bundle.js b/dist/bundle.js index 6e729e92d6..33dc9284ca 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -35712,31 +35712,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { @@ -57604,6 +57579,36 @@ 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: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +});/** * 有总页数和总行数的分页控件 * Created by Young's on 2016/10/13. */ diff --git a/dist/case.js b/dist/case.js index fd314080ea..ff48ff48bf 100644 --- a/dist/case.js +++ b/dist/case.js @@ -7975,14 +7975,11 @@ BI.shortcut("bi.sort_list", BI.SortList); /** * author: young * createdDate: 2018/12/18 - * description: 实现先loading 然后再渲染,解决beforeInit中loading无效 - * 继承此类,你需要明确,你的页面是根据动态请求后的结果来渲染的 - * 使用:1、在子类中使用loadedRender代替render方法;2、请求数据放到reqInitData中 + * description: */ BI.LoadingPane = BI.inherit(BI.Pane, { - _mount: function () { - var isMounted = BI.LoadingPane.superclass._mount.apply(this, arguments); + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); if (isMounted) { if (this.beforeInit) { this.__asking = true; diff --git a/dist/demo.js b/dist/demo.js index 1002ec1223..2849c470ad 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -3504,7 +3504,7 @@ Demo.COMPONENT_CONFIG = [{ * description: */ !(function () { - var Pane = BI.inherit(BI.Pane, { + var Pane = BI.inherit(BI.LoadingPane, { props: { }, diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index b198a1ccb5..264a89c852 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -35553,31 +35553,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { @@ -57445,6 +57420,36 @@ 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: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +});/** * 有总页数和总行数的分页控件 * Created by Young's on 2016/10/13. */ diff --git a/dist/fineui.js b/dist/fineui.js index 594c5d02a2..4f2d7d8d6a 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -35957,31 +35957,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { @@ -57849,6 +57824,36 @@ 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: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +});/** * 有总页数和总行数的分页控件 * Created by Young's on 2016/10/13. */ diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index bd4fd9be7a..b2d372ffe6 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -24464,31 +24464,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { @@ -40862,6 +40837,36 @@ 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: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +});/** * 有总页数和总行数的分页控件 * Created by Young's on 2016/10/13. */ diff --git a/src/base/pane.js b/src/base/pane.js index 6488fde38f..94089d04cd 100644 --- a/src/base/pane.js +++ b/src/base/pane.js @@ -17,31 +17,6 @@ BI.Pane = BI.inherit(BI.Widget, { }); }, - _mount: function () { - var isMounted = BI.Pane.superclass._mount.apply(this, arguments); - if (isMounted) { - if (this.beforeInit) { - this.__asking = true; - this.loading(); - this.beforeInit(BI.bind(this.__loaded, this)); - } - } - }, - - _initRender: function () { - if (this.beforeInit) { - this.__async = true; - } else { - this._render(); - } - }, - - __loaded: function () { - this.__asking = false; - this.loaded(); - this._render(); - }, - _assertTip: function () { var o = this.options; if (!this._tipText) { diff --git a/src/case/loading/loading_pane.js b/src/case/loading/loading_pane.js new file mode 100644 index 0000000000..2218685c54 --- /dev/null +++ b/src/case/loading/loading_pane.js @@ -0,0 +1,31 @@ +/** + * author: young + * createdDate: 2018/12/18 + * description: + */ +BI.LoadingPane = BI.inherit(BI.Pane, { + _mount: function () { + var isMounted = BI.Pane.superclass._mount.apply(this, arguments); + if (isMounted) { + if (this.beforeInit) { + this.__asking = true; + this.loading(); + this.beforeInit(BI.bind(this.__loaded, this)); + } + } + }, + + _initRender: function () { + if (this.beforeInit) { + this.__async = true; + } else { + this._render(); + } + }, + + __loaded: function () { + this.__asking = false; + this.loaded(); + this._render(); + } +}); \ No newline at end of file