From 172ddbcd88360f05cd1904a8a3098d7501a326c2 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 26 Feb 2021 12:56:09 +0800 Subject: [PATCH] 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);