From 3448d7fc00cdd1134c1772fdadb52eb5697af33c Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 2 Dec 2019 12:40:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BI-56649=20fix:=20=E5=8E=9F=E6=96=87?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=9A=84=E5=B0=91=E6=94=B9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/jquery/fn.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/jquery/fn.js b/src/core/platform/web/jquery/fn.js index e6ddce32c..9d94719c6 100644 --- a/src/core/platform/web/jquery/fn.js +++ b/src/core/platform/web/jquery/fn.js @@ -106,7 +106,10 @@ if (BI.jQuery) { textLeft = textLeft.substr(tidx + keyword.length); if (py != null) { - py = py.substr(tidx + keyword.length); + // 每一组拼音都应该前进,而不是只是当前的 + py = BI.map(py.split("\u200b"), function (idx, ps) { + return ps.slice(tidx + keyword.length); + }).join("\u200b"); } } else if (pidx != null && pidx >= 0) { // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件 From 250cceb293c96d65061eea9bf5667dbb39a3142c Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 2 Dec 2019 16:59:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-24696=20fix:=20=E4=B8=8D=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E7=88=B6=E8=8A=82=E7=82=B9=E5=8B=BE=E9=80=89=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=9A=84=E5=A4=8D=E9=80=89=E6=A0=91=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=B0=B4=E5=8D=B0=E5=92=8C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 3 +++ src/widget/multiselect/trigger/searcher.multiselect.js | 1 + src/widget/multitree/trigger/searcher.list.multi.tree.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index c5e29ff74..d73c1ae25 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # 更新日志 +2.0(2019-12) +- 不影响父节点勾选状态的复选树支持自定义水印和默认值 + 2.0(2019-11) - 日期系列新增setMinDate和setMaxDate接口 - 修复了同步复选树设置节点默认open后, 叶子节点无法选中的问题 diff --git a/src/widget/multiselect/trigger/searcher.multiselect.js b/src/widget/multiselect/trigger/searcher.multiselect.js index e9d484b42..abac99999 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.js @@ -26,6 +26,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { type: "bi.multi_select_editor", height: o.height, text: o.text, + watermark: o.watermark, listeners: [{ eventName: BI.MultiSelectEditor.EVENT_FOCUS, action: function () { diff --git a/src/widget/multitree/trigger/searcher.list.multi.tree.js b/src/widget/multitree/trigger/searcher.list.multi.tree.js index acfe1cf45..0985f9849 100644 --- a/src/widget/multitree/trigger/searcher.list.multi.tree.js +++ b/src/widget/multitree/trigger/searcher.list.multi.tree.js @@ -26,6 +26,8 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, { this.editor = BI.createWidget({ type: "bi.multi_select_editor", height: o.height, + text: o.text, + watermark: o.watermark, el: { type: "bi.simple_state_editor", height: o.height From ec771c01161d69e315c55fe41af7a61e3881fd2e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 2 Dec 2019 18:19:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-24691=20fix:=20=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E6=98=AF=E5=90=A6=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../treevaluechooser/combo.treevaluechooser.insert.js | 1 + src/component/treevaluechooser/combo.treevaluechooser.js | 1 + src/component/valuechooser/combo.valuechooser.insert.js | 1 + src/component/valuechooser/combo.valuechooser.js | 1 + src/widget/multiselect/multiselect.combo.js | 2 +- src/widget/multiselect/multiselect.insert.combo.js | 2 +- src/widget/multitree/multi.tree.combo.js | 6 ++++-- src/widget/multitree/multi.tree.insert.combo.js | 2 +- src/widget/multitree/multi.tree.list.combo.js | 2 +- 9 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 2a8b0ca54..8a95f2e36 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -25,6 +25,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + allowEdit: o.allowEdit, text: o.text, value: o.value, watermark: o.watermark, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index 662f22385..fbf813247 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -26,6 +26,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { this.combo = BI.createWidget({ type: "bi.multi_tree_combo", text: o.text, + allowEdit: o.allowEdit, value: o.value, watermark: o.watermark, element: this, diff --git a/src/component/valuechooser/combo.valuechooser.insert.js b/src/component/valuechooser/combo.valuechooser.insert.js index c1f290c3a..449446605 100644 --- a/src/component/valuechooser/combo.valuechooser.insert.js +++ b/src/component/valuechooser/combo.valuechooser.insert.js @@ -24,6 +24,7 @@ BI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, { this.combo = BI.createWidget({ type: "bi.multi_select_insert_combo", element: this, + allowEdit: o.allowEdit, text: o.text, value: o.value, itemsCreator: BI.bind(this._itemsCreator, this), diff --git a/src/component/valuechooser/combo.valuechooser.js b/src/component/valuechooser/combo.valuechooser.js index 312f4c0e4..00fafcb86 100644 --- a/src/component/valuechooser/combo.valuechooser.js +++ b/src/component/valuechooser/combo.valuechooser.js @@ -28,6 +28,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, { this.combo = BI.createWidget({ type: "bi.multi_select_combo", element: this, + allowEdit: o.allowEdit, text: o.text, value: o.value, itemsCreator: BI.bind(this._itemsCreator, this), diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 15b7d9062..4745ece5a 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -127,7 +127,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.combo = BI.createWidget({ type: "bi.combo", - toggle: false, + toggle: !o.allowEdit, container: o.container, el: this.trigger, adjustLength: 1, diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 5b1064dc5..b00eee3db 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -121,7 +121,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { this.combo = BI.createWidget({ type: "bi.combo", - toggle: false, + toggle: !o.allowEdit, el: this.trigger, adjustLength: 1, container: o.container, diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index 0aae1f0a2..89ce0949d 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -20,7 +20,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-tree-combo", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - height: 24 + height: 24, + allowEdit: true }); }, @@ -36,6 +37,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_trigger", + allowEdit: o.allowEdit, height: o.height, valueFormatter: o.valueFormatter, text: o.text, @@ -53,7 +55,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.combo = BI.createWidget({ type: "bi.combo", - toggle: false, + toggle: !o.allowEdit, container: o.container, el: this.trigger, adjustLength: 1, diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 690100305..77f4c9636 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -70,7 +70,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.combo = BI.createWidget({ type: "bi.combo", - toggle: false, + toggle: !o.allowEdit, container: o.container, el: this.trigger, adjustLength: 1, diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 4169827a8..6750b8192 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -86,7 +86,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.combo = BI.createWidget({ type: "bi.combo", - toggle: false, + toggle: !o.allowEdit, container: o.container, el: this.trigger, adjustLength: 1,