From 3cc5f6116260fd23d467000b11bc78bfa7ab3e54 Mon Sep 17 00:00:00 2001 From: windy Date: Mon, 30 Nov 2020 22:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20revert=20labe?= =?UTF-8?q?l=E5=90=8C=E6=AD=A5value=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 - src/base/single/text.js | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 0725712a10..d64fa93f2d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,5 @@ # 更新日志 2.0(2020-11) -- 修复了文本标签text传递空字符串后显示value值的问题 - 限制了title的最大高度 - bi.textarea_editor添加setWatermark方法 - 生命周期可以通过属性传递来操作 diff --git a/src/base/single/text.js b/src/base/single/text.js index 639599d91f..823843bfcd 100644 --- a/src/base/single/text.js +++ b/src/base/single/text.js @@ -80,6 +80,8 @@ var text = this._getShowText(); if (BI.isKey(text)) { this.setText(text); + } else if (BI.isKey(o.value)) { + this.setText(o.value); } if (BI.isKey(o.keyword)) { this.doRedMark(o.keyword); @@ -103,6 +105,7 @@ _getShowText: function () { var o = this.options; var text = BI.isFunction(o.text) ? o.text() : o.text; + text = BI.isKey(text) ? text : o.value; if (!BI.isKey(text)) { return ""; }