From d4daee240ec8d1b81a3b5e7e7809c907c3cf6bb6 Mon Sep 17 00:00:00 2001 From: Young Date: Tue, 18 Dec 2018 15:16:06 +0800 Subject: [PATCH] update --- demo/js/config/demo.pane.js | 2 +- dist/base.js | 25 +++++++++++ dist/bundle.ie.js | 58 +++++++++++--------------- dist/bundle.js | 58 +++++++++++--------------- dist/demo.js | 2 +- dist/fineui.ie.js | 58 +++++++++++--------------- dist/fineui.js | 58 +++++++++++--------------- dist/fineui_without_jquery_polyfill.js | 58 +++++++++++--------------- src/base/pane.js | 25 +++++++++++ src/case/loading/loading_pane.js | 34 --------------- 10 files changed, 177 insertions(+), 201 deletions(-) delete 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 30b2415a7..19d41644e 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.LoadingPane, { + var Pane = BI.inherit(BI.Pane, { props: { }, diff --git a/dist/base.js b/dist/base.js index ea4f3bd5f..62788d46c 100644 --- a/dist/base.js +++ b/dist/base.js @@ -218,6 +218,31 @@ 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 65bb07198..f4a72afd1 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -35308,6 +35308,31 @@ 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) { @@ -57175,39 +57200,6 @@ 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 () { - var isMounted = BI.LoadingPane.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 dfad0129e..6e729e92d 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -35712,6 +35712,31 @@ 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) { @@ -57579,39 +57604,6 @@ 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 () { - var isMounted = BI.LoadingPane.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/demo.js b/dist/demo.js index 2849c470a..1002ec122 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -3504,7 +3504,7 @@ Demo.COMPONENT_CONFIG = [{ * description: */ !(function () { - var Pane = BI.inherit(BI.LoadingPane, { + var Pane = BI.inherit(BI.Pane, { props: { }, diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 9c81c0af3..b198a1ccb 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -35553,6 +35553,31 @@ 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) { @@ -57420,39 +57445,6 @@ 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 () { - var isMounted = BI.LoadingPane.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 519d8b0f5..594c5d02a 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -35957,6 +35957,31 @@ 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) { @@ -57824,39 +57849,6 @@ 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 () { - var isMounted = BI.LoadingPane.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 f7a243e0e..bd4fd9be7 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -24464,6 +24464,31 @@ 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) { @@ -40837,39 +40862,6 @@ 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 () { - var isMounted = BI.LoadingPane.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 94089d04c..6488fde38 100644 --- a/src/base/pane.js +++ b/src/base/pane.js @@ -17,6 +17,31 @@ 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 deleted file mode 100644 index 0066c58fb..000000000 --- a/src/case/loading/loading_pane.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * author: young - * createdDate: 2018/12/18 - * description: 实现先loading 然后再渲染,解决beforeInit中loading无效 - * 继承此类,你需要明确,你的页面是根据动态请求后的结果来渲染的 - * 使用:1、在子类中使用loadedRender代替render方法;2、请求数据放到reqInitData中 - */ -BI.LoadingPane = BI.inherit(BI.Pane, { - - _mount: function () { - var isMounted = BI.LoadingPane.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