From 4ee7c2eb11d2be0c695e3304b2dce5bc469cd900 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 19 Dec 2021 12:21:57 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=94=B9=E4=B8=80=E4=B8=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/editor/editor.clear.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/case/editor/editor.clear.js b/src/case/editor/editor.clear.js index 372d31bdd..4a7916590 100644 --- a/src/case/editor/editor.clear.js +++ b/src/case/editor/editor.clear.js @@ -32,6 +32,7 @@ BI.ClearEditor = BI.inherit(BI.Widget, { this.clear = BI.createWidget({ type: "bi.icon_button", stopEvent: true, + invisible: BI.isKey(o.value), cls: "search-close-h-font" }); this.clear.on(BI.IconButton.EVENT_CHANGE, function () { @@ -113,12 +114,6 @@ BI.ClearEditor = BI.inherit(BI.Widget, { this.editor.on(BI.Editor.EVENT_STOP, function () { self.fireEvent(BI.ClearEditor.EVENT_STOP); }); - - if (BI.isKey(o.value)) { - this.clear.visible(); - } else { - this.clear.invisible(); - } }, _checkClear: function () { @@ -179,4 +174,4 @@ BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.clear_editor", BI.ClearEditor); \ No newline at end of file +BI.shortcut("bi.clear_editor", BI.ClearEditor);