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 () {