diff --git a/demo/js/case/editor/demo.clear_editor.js b/demo/js/case/editor/demo.clear_editor.js index 0e1e9519b..6ad9b4283 100644 --- a/demo/js/case/editor/demo.clear_editor.js +++ b/demo/js/case/editor/demo.clear_editor.js @@ -12,7 +12,8 @@ Demo.ClearEditor = BI.inherit(BI.Widget, { type: "bi.clear_editor", cls: "bi-border", width: 300, - watermark: "这个是带清除按钮的" + watermark: "这个是带清除按钮的", + value: 123 }], vgap: 20 }; diff --git a/dist/bundle.js b/dist/bundle.js index 8b5e8494f..28505ddcd 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -78523,7 +78523,8 @@ BI.ClearEditor = BI.inherit(BI.Widget, { allowBlank: true, errorText: o.errorText, validationChecker: o.validationChecker, - quitChecker: o.quitChecker + quitChecker: o.quitChecker, + value: o.value }); this.clear = BI.createWidget({ type: "bi.icon_button", @@ -78607,7 +78608,11 @@ BI.ClearEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.ClearEditor.EVENT_STOP); }); - this.clear.invisible(); + if (BI.isKey(o.value)) { + this.clear.visible(); + } else { + this.clear.invisible(); + } }, _checkClear: function () { diff --git a/dist/case.js b/dist/case.js index d6c501c17..73b0dc5e1 100644 --- a/dist/case.js +++ b/dist/case.js @@ -6581,7 +6581,8 @@ BI.ClearEditor = BI.inherit(BI.Widget, { allowBlank: true, errorText: o.errorText, validationChecker: o.validationChecker, - quitChecker: o.quitChecker + quitChecker: o.quitChecker, + value: o.value }); this.clear = BI.createWidget({ type: "bi.icon_button", @@ -6665,7 +6666,11 @@ BI.ClearEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.ClearEditor.EVENT_STOP); }); - this.clear.invisible(); + if (BI.isKey(o.value)) { + this.clear.visible(); + } else { + this.clear.invisible(); + } }, _checkClear: function () { diff --git a/dist/demo.js b/dist/demo.js index 3933fd8ca..bde246c51 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2471,7 +2471,8 @@ Demo.ClearEditor = BI.inherit(BI.Widget, { type: "bi.clear_editor", cls: "bi-border", width: 300, - watermark: "这个是带清除按钮的" + watermark: "这个是带清除按钮的", + value: 123 }], vgap: 20 }; diff --git a/src/case/editor/editor.clear.js b/src/case/editor/editor.clear.js index c784a862e..0657837da 100644 --- a/src/case/editor/editor.clear.js +++ b/src/case/editor/editor.clear.js @@ -26,7 +26,8 @@ BI.ClearEditor = BI.inherit(BI.Widget, { allowBlank: true, errorText: o.errorText, validationChecker: o.validationChecker, - quitChecker: o.quitChecker + quitChecker: o.quitChecker, + value: o.value }); this.clear = BI.createWidget({ type: "bi.icon_button", @@ -110,7 +111,11 @@ BI.ClearEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.ClearEditor.EVENT_STOP); }); - this.clear.invisible(); + if (BI.isKey(o.value)) { + this.clear.visible(); + } else { + this.clear.invisible(); + } }, _checkClear: function () {