From 757ee3eb4f47cdb1bf295451f229ad0bb4acf1f0 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 13 Oct 2022 23:46:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20body?= =?UTF-8?q?=E9=87=8C=E9=80=9A=E7=94=A8=E6=A0=B7=E5=BC=8Ffont-size=E8=BF=98?= =?UTF-8?q?=E6=98=AF12px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/less/main.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/less/main.less b/demo/less/main.less index 2e6c8ff61..87a094414 100644 --- a/demo/less/main.less +++ b/demo/less/main.less @@ -63,6 +63,7 @@ body { right: 0; top: 0; bottom: 0; + font-size: 1.2rem; } .bi-theme-dark body { @@ -98,4 +99,4 @@ body { .bi-progress-bar-bar { border-radius: 2rem; -} \ No newline at end of file +} From 298d11ef3f925d2f22f467858cc29abb4df387b6 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 14 Oct 2022 11:55:19 +0800 Subject: [PATCH 2/6] auto upgrade version to 2.0.20221014115505 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92dc5ff2c..954ae624c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221014104548", + "version": "2.0.20221014115505", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 96ef74fed37f85023a2fc771d96e663d6f09a7a2 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 16 Oct 2022 01:16:24 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feature:=20title=E5=9C=A8=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E4=B8=AAdom=E4=B8=8A=E5=8F=AA=E7=BB=91=E5=AE=9A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/0.single.js | 19 +++++++++++-------- src/core/4.widget.js | 6 ++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index e271cb5ad..93705ca91 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -67,6 +67,10 @@ BI.Single = BI.inherit(BI.Widget, { self.setValue(newValue); }) : o.value; BI.Single.superclass._init.apply(this, arguments); + }, + + _mounted: function () { + var o = this.options; if (o.enableHover || BI.isKey(o.title) || BI.isKey(o.warningTitle) || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { this.enableHover({ @@ -91,7 +95,7 @@ BI.Single = BI.inherit(BI.Widget, { opt || (opt = {}); var self = this; if (!this._hoverBinded) { - this.element.on("mouseenter.title" + this.getName(), function (e) { + this.element.unbind("mouseenter.title").on("mouseenter.title", function (e) { self._e = e; if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { delayingTooltips = self.getName(); @@ -109,7 +113,7 @@ BI.Single = BI.inherit(BI.Widget, { }, 500); } }); - this.element.on("mousemove.title" + this.getName(), function (e) { + this.element.unbind("mousemove.title").on("mousemove.title", function (e) { self._e = e; if (BI.isNotNull(self.showTimeout)) { clearTimeout(self.showTimeout); @@ -138,7 +142,7 @@ BI.Single = BI.inherit(BI.Widget, { } }, 500); }); - this.element.on("mouseleave.title" + this.getName(), function (e) { + this.element.unbind("mouseleave.title").on("mouseleave.title", function (e) { self._e = null; self._clearTimeOut(); self._hideTooltip(); @@ -151,9 +155,9 @@ BI.Single = BI.inherit(BI.Widget, { // 取消hover事件 this._clearTimeOut(); this._hideTooltip(); - this.element.unbind("mouseenter.title" + this.getName()) - .unbind("mousemove.title" + this.getName()) - .unbind("mouseleave.title" + this.getName()); + this.element.unbind("mouseenter.title") + .unbind("mousemove.title") + .unbind("mouseleave.title"); this._hoverBinded = false; }, @@ -217,8 +221,7 @@ BI.Single = BI.inherit(BI.Widget, { return this.options.value; }, - __d: function () { - BI.Single.superclass.__d.call(this); + _destroyed: function () { if (BI.isNotNull(this.showTimeout)) { clearTimeout(this.showTimeout); this.showTimeout = null; diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 3c28a3976..5af118dd5 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -97,6 +97,8 @@ beforeMount: null, mounted: null, + // 不想重写mounted时用 + _mounted: null, shouldUpdate: null, @@ -109,6 +111,8 @@ beforeDestroy: null, destroyed: null, + // 不想重写destroyed时用 + _destroyed: null, _init: function () { BI.Widget.superclass._init.apply(this, arguments); @@ -429,6 +433,7 @@ child.__afterMount && child.__afterMount(lifeHook, predicate); } if (lifeHook !== false && !this.__async) { + callLifeHook(this, "_mounted"); callLifeHook(this, "mounted"); this.fireEvent(BI.Events.MOUNT); } @@ -736,6 +741,7 @@ this.__d(); this._parent = null; this._isMounted = false; + callLifeHook(this, "_destroyed"); callLifeHook(this, "destroyed"); this.destroyed = null; this._isDestroyed = true; From 9dd0602fcce2517603a572f0453ac05257802ead Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 16 Oct 2022 01:48:39 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81ref=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=BC=A0=E4=B8=AA=E5=AF=B9=E8=B1=A1=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E4=BC=A0=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/3.ob.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/core/3.ob.js b/src/core/3.ob.js index 9cf8fd3f9..a9019c3a8 100644 --- a/src/core/3.ob.js +++ b/src/core/3.ob.js @@ -79,23 +79,25 @@ // 获得一个当前对象的引用 _initRef: function () { - if (this.options.__ref) { - this.options.__ref.call(this, this); + var o = this.options; + if (o.__ref) { + BI.isFunction(o.__ref) ? o.__ref.call(this, this) : o.__ref.current = this; } - if (this.options.ref) { - this.options.ref.call(this, this); + if (o.ref) { + BI.isFunction(o.ref) ? o.ref.call(this, this) : o.ref.current = this; } }, //释放当前对象 _purgeRef: function () { - if (this.options.__ref) { - this.options.__ref.call(null, null); - this.options.__ref = null; + var o = this.options; + if (o.__ref) { + BI.isFunction(o.__ref) ? o.__ref.call(null, null) : o.__ref.current = null; + o.__ref = null; } - if (this.options.ref) { - this.options.ref.call(null, null); - this.options.ref = null; + if (o.ref) { + BI.isFunction(o.ref) ? o.ref.call(null, null) : o.ref.current = null; + o.ref = null; } }, From 06413d12aaf47ffb06d771eb966187b45b45beed Mon Sep 17 00:00:00 2001 From: data Date: Sun, 16 Oct 2022 09:10:21 +0800 Subject: [PATCH 5/6] auto upgrade version to 2.0.20221016090937 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 954ae624c..e61b4454b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221014115505", + "version": "2.0.20221016090937", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 75efda0aa756e68cb7093252a9d6f603e954c137 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 17 Oct 2022 12:26:28 +0800 Subject: [PATCH 6/6] auto upgrade version to 2.0.20221017122609 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e61b4454b..b1083bcdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221016090937", + "version": "2.0.20221017122609", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",