From 088a3c3dc06458188e224e5c9aec6b182ffddf93 Mon Sep 17 00:00:00 2001
From: windy <1374721899@qq.com>
Date: Fri, 26 Jul 2019 09:06:26 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B9=E6=8D=AEcomment=E4=BF=AE?=
 =?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/case/trigger/trigger.icon.text.js | 3 ++-
 src/case/trigger/trigger.text.js      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/case/trigger/trigger.icon.text.js b/src/case/trigger/trigger.icon.text.js
index 4721eefa4e..eac94ab508 100644
--- a/src/case/trigger/trigger.icon.text.js
+++ b/src/case/trigger/trigger.icon.text.js
@@ -93,8 +93,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
 
     setTextCls: function(cls) {
         var o = this.options;
-        this.text.element.removeClass(o.textCls).addClass(cls);
+        var oldCls = o.textCls;
         o.textCls = cls;
+        this.text.element.removeClass(oldCls).addClass(cls);
     },
 
     setText: function (text) {
diff --git a/src/case/trigger/trigger.text.js b/src/case/trigger/trigger.text.js
index 8d7ffb251f..81815e2496 100644
--- a/src/case/trigger/trigger.text.js
+++ b/src/case/trigger/trigger.text.js
@@ -57,8 +57,9 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
 
     setTextCls: function(cls) {
         var o = this.options;
-        this.text.element.removeClass(o.textCls).addClass(cls);
+        var oldCls = o.textCls;
         o.textCls = cls;
+        this.text.element.removeClass(oldCls).addClass(cls);
     },
 
     setText: function (text) {