From 46a84ed360a642ec2dec246cfa23d5c48eed5737 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 23 Mar 2018 15:01:53 +0800 Subject: [PATCH] =?UTF-8?q?clear=5Feditor=E7=9A=84=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/editor/demo.clear_editor.js | 3 ++- dist/bundle.js | 9 +++++++-- dist/case.js | 9 +++++++-- dist/demo.js | 3 ++- src/case/editor/editor.clear.js | 9 +++++++-- 5 files changed, 25 insertions(+), 8 deletions(-) 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 () {