Browse Source

无JIRA bi.search_editor 有初始值的时候显示清除按钮

es6
Dailer 3 years ago
parent
commit
050267de06
  1. 5
      src/widget/editor/editor.search.js

5
src/widget/editor/editor.search.js

@ -10,7 +10,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
errorText: "", errorText: "",
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
validationChecker: BI.emptyFn, validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn quitChecker: BI.emptyFn,
value: ""
}); });
}, },
_init: function () { _init: function () {
@ -33,7 +34,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
type: "bi.icon_button", type: "bi.icon_button",
stopEvent: true, stopEvent: true,
cls: "close-font", cls: "close-font",
invisible: !o.value invisible: BI.isKey(o.value)
}); });
this.clear.on(BI.IconButton.EVENT_CHANGE, function () { this.clear.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue(""); self.setValue("");

Loading…
Cancel
Save