From 9001ba27b36a803a88077caafa65a15474bbd846 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 1 Jul 2020 16:31:35 +0800 Subject: [PATCH] =?UTF-8?q?BI-67721=20fix:=20color=5Fchooser=20setValue?= =?UTF-8?q?=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 3 +++ src/case/colorchooser/colorchooser.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index df0987cc07..67fbc34c6a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # 更新日志 +2.0(2020-07) +- 修复了颜色选择器设置值为null的时候,trigger和popup表现不一致的问题 + 2.0(2020-06) - 修复了复选下拉树半选节点的子节点未加载的时候,点选该半选节点是取消选中的问题 - 下拉树系列支持isNeedAdjustWidth以动态变化宽度 diff --git a/src/case/colorchooser/colorchooser.js b/src/case/colorchooser/colorchooser.js index 7fe9b367dd..50d61bb66a 100644 --- a/src/case/colorchooser/colorchooser.js +++ b/src/case/colorchooser/colorchooser.js @@ -19,6 +19,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, { BI.ColorChooser.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.value = o.value || ""; this.combo = BI.createWidget({ type: "bi.combo", element: this, @@ -89,7 +90,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, { }, setValue: function (color) { - this.combo.setValue(color); + this.combo.setValue(color || ""); }, getValue: function () {