diff --git a/changelog.md b/changelog.md index 9e23a72dc..d9159329c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2021-07) +- width属性支持calc() - 修改了颜色选择器交互 - 新增bi.horizontal_fill、bi.vertical_fill布局 - 增加module定义插件版本号 diff --git a/src/case/combo/bubblecombo/combo.bubble.js b/src/case/combo/bubblecombo/combo.bubble.js index b610cf021..dcf6f62e0 100644 --- a/src/case/combo/bubblecombo/combo.bubble.js +++ b/src/case/combo/bubblecombo/combo.bubble.js @@ -36,6 +36,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { element: this, trigger: o.trigger, toggle: o.toggle, + logic: o.logic, container: o.container, direction: o.direction, isDefaultInit: o.isDefaultInit, diff --git a/src/core/2.base.js b/src/core/2.base.js index 3aa8a155b..16a4a9f70 100644 --- a/src/core/2.base.js +++ b/src/core/2.base.js @@ -500,7 +500,7 @@ if (!_global.BI) { if (typeof w === "number") { return w >= 0; } else if (typeof w === "string") { - return /^\d{1,3}(\.\d)?%$/.exec(w) || w == "auto" || /^\d+px$/.exec(w); + return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+px$/.test(w) || /^calc/.test(w); } },