From 172ddbcd88360f05cd1904a8a3098d7501a326c2 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 26 Feb 2021 12:56:09 +0800 Subject: [PATCH 1/4] update --- src/base/single/button/button.basic.js | 10 ++++++---- src/case/segment/button.segment.js | 6 +----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index fb2f87656..8c32d1fa8 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -381,12 +381,18 @@ BI.BasicButton = BI.inherit(BI.Single, { setText: function (text) { this.options.text = text; + this.options.setText && this.options.setText.call(this, text); }, getText: function () { return this.options.text; }, + setValue: function (text) { + BI.BasicButton.superclass.setValue.apply(this, arguments); + this.options.setText && this.options.setText.call(this, text); + }, + _setEnable: function (enable) { BI.BasicButton.superclass._setEnable.apply(this, arguments); if (enable === true) { @@ -404,10 +410,6 @@ BI.BasicButton = BI.inherit(BI.Single, { empty: function () { BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName()); BI.BasicButton.superclass.empty.apply(this, arguments); - }, - - destroy: function () { - BI.BasicButton.superclass.destroy.apply(this, arguments); } }); BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE"; diff --git a/src/case/segment/button.segment.js b/src/case/segment/button.segment.js index d3bf0b286..0e3ac343b 100644 --- a/src/case/segment/button.segment.js +++ b/src/case/segment/button.segment.js @@ -41,10 +41,6 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, { setText: function (text) { BI.SegmentButton.superclass.setText.apply(this, arguments); this.text.setText(text); - }, - - destroy: function () { - BI.SegmentButton.superclass.destroy.apply(this, arguments); } }); -BI.shortcut("bi.segment_button", BI.SegmentButton); \ No newline at end of file +BI.shortcut("bi.segment_button", BI.SegmentButton); From 11a0091ce1b431e97873734486afc4fb192ceb27 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 26 Feb 2021 12:57:59 +0800 Subject: [PATCH 2/4] update --- src/base/single/button/button.basic.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 8c32d1fa8..0f5f9a4d9 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -357,6 +357,7 @@ BI.BasicButton = BI.inherit(BI.Single, { if (o.shadow && !o.isShadowShowingOnSelected) { this.$mask && this.$mask.setVisible(false); } + this.options.setSelected && this.options.setSelected.call(this, b); }, isSelected: function () { From bcf8be7bf7a7648c701a195d76ec93267850235b Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 26 Feb 2021 12:58:55 +0800 Subject: [PATCH 3/4] update --- src/base/single/button/button.basic.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 0f5f9a4d9..40b6f003f 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -414,3 +414,4 @@ BI.BasicButton = BI.inherit(BI.Single, { } }); BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE"; +BI.shortcut("bi.basic_button", BI.BasicButton); From dea170521980618143f1c467c81e36ff89e410ea Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 26 Feb 2021 13:03:47 +0800 Subject: [PATCH 4/4] update --- src/base/single/button/button.basic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 40b6f003f..2bd82b17d 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -389,9 +389,9 @@ BI.BasicButton = BI.inherit(BI.Single, { return this.options.text; }, - setValue: function (text) { + setValue: function (value) { BI.BasicButton.superclass.setValue.apply(this, arguments); - this.options.setText && this.options.setText.call(this, text); + this.options.setValue && this.options.setValue.call(this, value); }, _setEnable: function (enable) {