From c6c757a07df520b4dd3724c6880e28ee08d55c5f Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 14 Sep 2022 16:40:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-73206=20feat:=20=E6=8A=8ABI=E5=92=8C?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=BD=BF=E7=94=A8=E7=9A=84=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B0=81=E8=A3=85=E6=88=90cbb=20-=20bi.icon?= =?UTF-8?q?=5Fchange=5Fbutton=E7=9A=84=E5=9B=BE=E6=A0=87=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/button/icon/icon.change.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/case/button/icon/icon.change.js b/src/case/button/icon/icon.change.js index 8790008e2..e65160879 100644 --- a/src/case/button/icon/icon.change.js +++ b/src/case/button/icon/icon.change.js @@ -31,8 +31,11 @@ BI.IconChangeButton = BI.inherit(BI.Single, { }, _init: function () { - BI.IconChangeButton.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.iconCls = BI.isFunction(o.iconCls) ? this.__watch(o.iconCls, function (context, newValue) { + self.setIcon(newValue); + }) : o.iconCls; + BI.IconChangeButton.superclass._init.apply(this, arguments); this.button = BI.createWidget({ type: "bi.icon_button", element: this, @@ -80,4 +83,4 @@ BI.IconChangeButton = BI.inherit(BI.Single, { } }); BI.IconChangeButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_change_button", BI.IconChangeButton); \ No newline at end of file +BI.shortcut("bi.icon_change_button", BI.IconChangeButton);