From b0b8c8562053423d16bbf65184d266beaaf23375 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Sat, 4 May 2019 17:45:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20setValue=20&&=20getValue=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/demo.treevaluechoosercombo.js | 13 ++++++ dist/2.0/fineui.ie.js | 12 +++--- dist/2.0/fineui.js | 12 +++--- dist/bundle.ie.js | 12 +++--- dist/bundle.js | 12 +++--- dist/demo.js | 13 ++++++ dist/fineui.css | 43 +++++++++++++++---- dist/fineui.ie.js | 12 +++--- dist/fineui.js | 12 +++--- dist/fineui_without_jquery_polyfill.js | 12 +++--- dist/widget.js | 12 +++--- .../abstract.treevaluechooser.list.js | 6 +-- .../combo.listtreevaluechooser.js | 2 +- .../combo.treevaluechooser.insert.js | 2 +- src/widget/multitree/multi.tree.list.combo.js | 2 +- 15 files changed, 114 insertions(+), 63 deletions(-) diff --git a/demo/js/component/demo.treevaluechoosercombo.js b/demo/js/component/demo.treevaluechoosercombo.js index 1d5075e13..f91b32ceb 100644 --- a/demo/js/component/demo.treevaluechoosercombo.js +++ b/demo/js/component/demo.treevaluechoosercombo.js @@ -18,6 +18,19 @@ Demo.TreeValueChooser = BI.inherit(BI.Widget, { callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); } }); + widget.setValue({ + "中国": { + "安徽省": { + "安庆市": {} + } + }, + "newValue": {} + }); + widget1.setValue([ + ["中国", "安徽省"], + ["中国", "安徽省", "安庆市"], + ["newValue"] + ]); return { type: "bi.vertical", items: [{ diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 5f146657d..9abb3dee0 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -73196,7 +73196,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -84533,20 +84533,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -84792,7 +84792,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -84845,7 +84845,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 298fefd4a..7a4e470b1 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -73600,7 +73600,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -84937,20 +84937,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -85196,7 +85196,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -85249,7 +85249,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index 5f146657d..9abb3dee0 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -73196,7 +73196,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -84533,20 +84533,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -84792,7 +84792,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -84845,7 +84845,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/bundle.js b/dist/bundle.js index 298fefd4a..7a4e470b1 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -73600,7 +73600,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -84937,20 +84937,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -85196,7 +85196,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -85249,7 +85249,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/demo.js b/dist/demo.js index 9831888e1..9c93f09eb 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2713,6 +2713,19 @@ BI.shortcut("demo.center", Demo.Center);Demo.TreeValueChooser = BI.inherit(BI.Wi callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); } }); + widget.setValue({ + "中国": { + "安徽省": { + "安庆市": {} + } + }, + "newValue": {} + }); + widget1.setValue([ + ["中国", "安徽省"], + ["中国", "安徽省", "安庆市"], + ["newValue"] + ]); return { type: "bi.vertical", items: [{ diff --git a/dist/fineui.css b/dist/fineui.css index 601aae775..68d3fd322 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -2228,8 +2228,8 @@ textarea { _background: none; } .ztree li span.button.chk.checkbox_false_part { - background: url('images/2x/icon/half_selected.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png'); + background: url('images/2x/icon/check_box_normal.png') no-repeat center center; + _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png'); background-size: contain; _background: none; } @@ -2274,8 +2274,8 @@ textarea { _background: none; } .ztree.hack li span.button.chk.checkbox_false_part { - background: url('images/1x/icon/half_selected.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png'); + background: url('images/1x/icon/check_box_normal.png') no-repeat center center; + _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png'); _background: none; } .ztree.hack li span.button.chk.checkbox_false_part_focus { @@ -3579,7 +3579,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, opacity: 0; } .bi-checkbox.disabled.active .checkbox-content { - border-color: #e8eaed; + border-color: #d0d4da; } .bi-checkbox.disabled.active .checkbox-content:after { opacity: 1; @@ -3587,6 +3587,16 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, .bi-theme-dark .bi-checkbox .checkbox-content { border-color: #9EA6B2; } +.bi-theme-dark .bi-checkbox.active .checkbox-content, +.bi-theme-dark .bi-checkbox:active .checkbox-content { + border-color: #3685f2; +} +.bi-theme-dark .bi-checkbox.disabled .checkbox-content { + background-color: #606479; +} +.bi-theme-dark .bi-checkbox.disabled.active .checkbox-content { + border-color: #606479; +} .bi-file { opacity: 0; filter: alpha(opacity=0); @@ -3765,6 +3775,21 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, opacity: 1; filter: alpha(opacity=100); } + +.bi-list-display-tree .ztree li a, +.bi-list-display-tree .ztree li span { + cursor: default !important; +} +.bi-list-display-tree .ztree li a:hover { + text-decoration: none; +} +.bi-list-display-tree .ztree li a.curSelectedNode { + padding-top: 1px; + border: none; + background-color: inherit; + opacity: 1; + filter: alpha(opacity=100); +} .ztree * { padding: 0; margin: 0; @@ -4548,8 +4573,8 @@ textarea::-webkit-scrollbar-thumb:hover { _background: none; } .ztree li span.button.chk.checkbox_false_part { - background: url('resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png'); + background: url('resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png') no-repeat center center; + _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png'); background-size: contain; _background: none; } @@ -4594,8 +4619,8 @@ textarea::-webkit-scrollbar-thumb:hover { _background: none; } .ztree.hack li span.button.chk.checkbox_false_part { - background: url('resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png'); + background: url('resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png') no-repeat center center; + _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png'); _background: none; } .ztree.hack li span.button.chk.checkbox_false_part_focus { diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 5b6fef10d..0321f02b8 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -73441,7 +73441,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -84778,20 +84778,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -85037,7 +85037,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -85090,7 +85090,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/fineui.js b/dist/fineui.js index 1c0b4dd1d..aa8d4eb60 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -73845,7 +73845,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -85182,20 +85182,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -85441,7 +85441,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -85494,7 +85494,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 66b47d71c..5a9428899 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -56236,7 +56236,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -67573,20 +67573,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -67832,7 +67832,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -67885,7 +67885,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/dist/widget.js b/dist/widget.js index 0a3250a50..56d5fc126 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -13240,7 +13240,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { BI.MultiTreeInsertCombo.EVENT_CONFIRM = "MultiTreeInsertCombo.EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo);/** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */ @@ -24577,20 +24577,20 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, @@ -24836,7 +24836,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, @@ -24889,7 +24889,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.list.js b/src/component/treevaluechooser/abstract.treevaluechooser.list.js index 2d43295dd..da4d21b74 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.list.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.list.js @@ -33,20 +33,20 @@ BI.AbstractListTreeValueChooser = BI.inherit(BI.AbstractTreeValueChooser, { if(!BI.has(result, node.id)) { createOneJson(node, node.parent && node.parent.id); } - result[node.id].isLeaf = id === path.length - 1; + result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1); } }); }); } - function createOneJson(node, pId, leaf) { + function createOneJson(node, pId) { result[node.id] = { id: node.id, pId: pId, text: node.text, value: node.value, open: true, - isLeaf: leaf + isLeaf: node.isLeaf }; } }, diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index 0a1d327e4..47792fa63 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -32,7 +32,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeListCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 530c13f54..aadbdfcf7 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -32,7 +32,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { height: o.height }); - this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM, function () { + this.combo.on(BI.MultiTreeInsertCombo.EVENT_CONFIRM, function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); }); }, diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 8d7f2e9f0..b5d3df844 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -1,5 +1,5 @@ /** - * 可以往当前选中节点下添加新值的下拉树 + * 选中节点不影响父子节点状态的下拉树 * @class BI.MultiTreeListCombo * @extends BI.Single */