diff --git a/demo/js/config/demo.pane.js b/demo/js/config/demo.pane.js index 30b2415a71..19d41644eb 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 ea4f3bd5f9..62788d46cc 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 65bb071981..f4a72afd1c 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 dfad0129e3..6e729e92d6 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 2849c470ad..1002ec1223 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 9c81c0af31..b198a1ccb5 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 519d8b0f58..594c5d02a2 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 f7a243e0ef..bd4fd9be7a 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 94089d04cd..6488fde38f 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 0066c58fbc..0000000000 --- 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