From 9f65ded918e7e8aaa1805fdcd3508d1ab8320b6f Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 20 Oct 2021 19:16:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E6=94=B9?= =?UTF-8?q?=E4=B8=8B=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.compact.js | 2 +- src/core/4.widget.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index fc7d7dfff..69a0a3196 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -183,7 +183,7 @@ delete this.__cacheStore; }; - _.each(["_afterRender", "_mount", "__afterMount"], function (name) { + _.each(["__afterRender", "_mount", "__afterMount"], function (name) { var old = BI.Widget.prototype[name]; old && (BI.Widget.prototype[name] = function () { this.store && pushTarget(this.store); diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 94a2fe6e8..f9f18c253 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -128,7 +128,7 @@ } renderCallbackCalled = true; self._render(); - self._afterRender(); + self.__afterRender(); self.__async = false; } @@ -137,7 +137,7 @@ (self.options.beforeRender || self.beforeRender).call(self, render); } else { self._render(); - self._afterRender(); + self.__afterRender(); } } @@ -149,7 +149,7 @@ } }, - _afterRender: function () { + __afterRender: function () { pushTarget(this); this.__async === true && this._isMounted && callLifeHook(this, "beforeMount"); this._mount(); From 78eb0a6518996fc0aa8f93b19e03f20ecd573b1c Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 21 Oct 2021 15:30:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?BI-95811=20feat:=20=E6=94=AF=E6=8C=81direct?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/editoriconcheckcombo/combo.editiconcheck.js | 1 + src/case/combo/icontextvaluecombo/combo.icontextvalue.js | 1 + src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js | 1 + src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js | 3 ++- src/case/combo/textvaluecombo/combo.textvalue.js | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/case/combo/editoriconcheckcombo/combo.editiconcheck.js b/src/case/combo/editoriconcheckcombo/combo.editiconcheck.js index 8ab27cf1a..28c57a2e9 100644 --- a/src/case/combo/editoriconcheckcombo/combo.editiconcheck.js +++ b/src/case/combo/editoriconcheckcombo/combo.editiconcheck.js @@ -64,6 +64,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { this.editorIconCheckCombo = BI.createWidget({ type: "bi.combo", container: o.container, + direction: o.direction, element: this, adjustLength: 2, el: this.trigger, diff --git a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js index d114dddee..118138779 100644 --- a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js +++ b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js @@ -52,6 +52,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, { type: "bi.combo", element: this, container: o.container, + direction: o.direction, adjustLength: 2, el: this.trigger, popup: { diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index 05553d05a..e52bd2a25 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -22,6 +22,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { type: "bi.combo", cls: "bi-border bi-focus-shadow", container: o.container, + direction: o.direction, adjustLength: 2, toggle: false, ref: function () { diff --git a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js index 996e7adf6..530cc2a01 100644 --- a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js +++ b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js @@ -44,6 +44,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, { this.textIconCheckCombo = BI.createWidget({ type: "bi.combo", container: o.container, + direction: o.direction, element: this, adjustLength: 2, el: this.trigger, @@ -82,4 +83,4 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, { } }); BI.TextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo); \ No newline at end of file +BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo); diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index b0ff081b7..b0242a64d 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -46,6 +46,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { this.textIconCombo = BI.createWidget({ type: "bi.combo", container: o.container, + direction: o.direction, element: this, adjustLength: 2, el: this.trigger, From 4d89ac16bf1a67382e6cb408de18c8807dd9d30a Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 21 Oct 2021 15:35:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index fcafdf807..aa76c2e9d 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -19,6 +19,8 @@ interface UIProps { interface AdditionalProps { column: number; row: number; + innerVGap: number; + innerHGap: number; } interface ElementClassProps extends UIProps { From 03b810588818f7129893b102ef74f889ed4a7203 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 21 Oct 2021 16:22:52 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=A4=9A=E4=BD=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index e52bd2a25..05553d05a 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -22,7 +22,6 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { type: "bi.combo", cls: "bi-border bi-focus-shadow", container: o.container, - direction: o.direction, adjustLength: 2, toggle: false, ref: function () { From 3a9a45563b23f0034e938301bfa801f08433d912 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 22 Oct 2021 11:46:32 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4loadingpane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/config/demo.pane.js | 13 ++++++++--- karma.conf.js | 1 - src/case/loading/loading_pane.js | 31 ------------------------- typescript/case/loading/loading_pane.ts | 5 ---- typescript/index.ts | 3 --- 5 files changed, 10 insertions(+), 43 deletions(-) delete mode 100644 src/case/loading/loading_pane.js delete mode 100644 typescript/case/loading/loading_pane.ts diff --git a/demo/js/config/demo.pane.js b/demo/js/config/demo.pane.js index 30b2415a7..e6cb35c62 100644 --- a/demo/js/config/demo.pane.js +++ b/demo/js/config/demo.pane.js @@ -4,11 +4,15 @@ * description: */ !(function () { - var Pane = BI.inherit(BI.LoadingPane, { + var Pane = BI.inherit(BI.Pane, { props: { }, + mounted: function () { + console.log('loading pane mounted'); + }, + render: function () { return { type: "bi.center_adapt", @@ -19,11 +23,14 @@ }; }, - beforeInit: function (callback) { + beforeRender: function (callback) { + var self = this; + this.loading(); setTimeout(function () { + self.loaded(); callback(); }, 3000); } }); BI.shortcut("demo.pane", Pane); -})(); \ No newline at end of file +})(); diff --git a/karma.conf.js b/karma.conf.js index 8b5bca997..1152ccb6a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -35,7 +35,6 @@ module.exports = function (config) { exclude: [ "src/base/single/input/file.js", - "src/case/loading/loading_pane.js", "src/case/ztree/**/*.js", "src/widget/multitree/**/*.js", "src/widget/multiselecttree/**/*.js", diff --git a/src/case/loading/loading_pane.js b/src/case/loading/loading_pane.js deleted file mode 100644 index 2218685c5..000000000 --- a/src/case/loading/loading_pane.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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 diff --git a/typescript/case/loading/loading_pane.ts b/typescript/case/loading/loading_pane.ts deleted file mode 100644 index 362c8f1b4..000000000 --- a/typescript/case/loading/loading_pane.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Pane } from "../../base/pane"; - -export declare class LoadingPane extends Pane { - __loaded: (...args: any[]) => void; -} diff --git a/typescript/index.ts b/typescript/index.ts index fdbae2aa0..6e6131a7d 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -24,7 +24,6 @@ import { SmallTextValueCombo } from './case/combo/combo.textvaluesmall'; import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; import { SignEditor } from "./case/editor/editor.sign"; import { StateEditor } from './case/editor/editor.state'; -import { LoadingPane } from "./case/loading/loading_pane"; import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; @@ -205,7 +204,6 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { HighlightBehavior: typeof HighlightBehavior; RedMarkBehavior: typeof RedMarkBehavior; Pane: typeof Pane; - LoadingPane: typeof LoadingPane; Tab: typeof Tab; ButtonGroup: typeof ButtonGroup; Combo: typeof Combo; @@ -411,7 +409,6 @@ export { BehaviorFactory, RedMarkBehavior, HighlightBehavior, - LoadingPane, Searcher, AbstractLabel, Label,