From d2b3b6ae4cfb52bf00810cf732c2ec75b60228f9 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Thu, 26 Nov 2020 10:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20"bi.textarea?= =?UTF-8?q?=5Feditor"=E6=B7=BB=E5=8A=A0setWatermark=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/base/single/editor/editor.textarea.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 70356883d..7644bc46f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-11) +- bi.textarea_editor添加setWatermark方法 - 修复了颜色选择器hex框不能输入为空的问题 - 增加纯文本组件bi.pure_text - store支持webworker,引入多线程机制 diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index 37be81a9f..91274d7af 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -16,7 +16,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { }); }, - render: function() { + render: function () { var o = this.options, self = this; this.content = BI.createWidget({ type: "bi.layout", @@ -25,7 +25,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { height: "100%", cls: "bi-textarea textarea-editor-content display-block" }); - this.content.element.css({resize: "none"}); + this.content.element.css({ resize: "none" }); BI.createWidget({ type: "bi.absolute", element: this, @@ -175,6 +175,11 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { return this.style; }, + setWatermark: function (v) { + this.options.watermark = v; + this._checkWaterMark(); + }, + _setValid: function (b) { BI.TextAreaEditor.superclass._setValid.apply(this, arguments); // this.content.setValid(b); @@ -189,4 +194,4 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR"; BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.textarea_editor", BI.TextAreaEditor); \ No newline at end of file +BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);