diff --git a/changelog.md b/changelog.md
index cf06f448c..ec029ccac 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,6 @@
# 更新日志
2.0(2020-12)
+- 同步树列表系列支持不显示节点连接线和展开收起图标
- 规范了下拉树trigger中显示值的显示顺序
- bi.editor支持传入autocomplete
- [视觉]editor水印间距统一与文本域水印不可选中
diff --git a/src/base/tree/ztree/asynctree.js b/src/base/tree/ztree/asynctree.js
index 89f02680a..21ed1c161 100644
--- a/src/base/tree/ztree/asynctree.js
+++ b/src/base/tree/ztree/asynctree.js
@@ -21,6 +21,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
// 配置属性
_configSetting: function () {
+ var o = this.options;
var paras = this.options.paras;
var self = this;
var setting = {
@@ -44,7 +45,8 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
showIcon: false,
expandSpeed: "",
nameIsHTML: true,
- dblClickExpand: false
+ dblClickExpand: false,
+ showLine: o.showLine
},
callback: {
beforeCheck: beforeCheck,
diff --git a/src/base/tree/ztree/treeview.js b/src/base/tree/ztree/treeview.js
index 2250b4fb7..62abc929e 100644
--- a/src/base/tree/ztree/treeview.js
+++ b/src/base/tree/ztree/treeview.js
@@ -11,7 +11,8 @@ BI.TreeView = BI.inherit(BI.Pane, {
paras: {
selectedValues: {}
},
- itemsCreator: BI.emptyFn
+ itemsCreator: BI.emptyFn,
+ showLine: true
});
},
_init: function () {
@@ -69,6 +70,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_configSetting: function () {
var paras = this.options.paras;
var self = this;
+ var o = this.options;
var setting = {
async: {
enable: true,
@@ -92,7 +94,8 @@ BI.TreeView = BI.inherit(BI.Pane, {
showIcon: false,
expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替
- dblClickExpand: false
+ dblClickExpand: false,
+ showLine: o.showLine,
},
callback: {
beforeExpand: beforeExpand,
@@ -333,7 +336,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
- n.value = n.value || n.text;
+ n.value = BI.isUndefined(n.value) ? n.text : n.value;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = BI.$("
").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
diff --git a/src/component/treevaluechooser/pane.treevaluechooser.js b/src/component/treevaluechooser/pane.treevaluechooser.js
index 1d961a517..06a9b0e3e 100644
--- a/src/component/treevaluechooser/pane.treevaluechooser.js
+++ b/src/component/treevaluechooser/pane.treevaluechooser.js
@@ -11,7 +11,8 @@ BI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {
return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-tree-value-chooser-pane",
items: null,
- itemsCreator: BI.emptyFn
+ itemsCreator: BI.emptyFn,
+ showLine: false
});
},
@@ -19,8 +20,9 @@ BI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {
BI.TreeValueChooserPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.pane = BI.createWidget({
- type: "bi.multi_select_tree",
+ type: o.hideSearch ? "bi.multi_select_tree_popup" : "bi.multi_select_tree",
element: this,
+ showLine: o.showLine,
itemsCreator: BI.bind(this._itemsCreator, this)
});
diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less
index 472bf063e..181aa69e4 100644
--- a/src/less/base/tree/ztree.less
+++ b/src/less/base/tree/ztree.less
@@ -189,6 +189,14 @@
height: 24px
}
+.ztree li span.button.switch.noline_open {
+ width: 0;
+}
+
+.ztree li span.button.switch.noline_close {
+ width: 0;
+}
+
.ztree li span.button.noline_open {
background-position: -92px -72px
}
@@ -203,6 +211,7 @@
.ztree li span.button.noline_docu {
background: none;
+ width: 0;
}
.ztree li span.button.ico_open {
diff --git a/src/widget/multiselecttree/multiselecttree.js b/src/widget/multiselecttree/multiselecttree.js
index 3771673ce..8654996c0 100644
--- a/src/widget/multiselecttree/multiselecttree.js
+++ b/src/widget/multiselecttree/multiselecttree.js
@@ -20,7 +20,8 @@ BI.MultiSelectTree = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({
type: "bi.multi_select_tree_popup",
- itemsCreator: o.itemsCreator
+ itemsCreator: o.itemsCreator,
+ showLine: o.showLine
});
this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE, function () {
if (self.searcher.isSearching()) {
diff --git a/src/widget/multiselecttree/multiselecttree.popup.js b/src/widget/multiselecttree/multiselecttree.popup.js
index 4c28651a8..95af718ce 100644
--- a/src/widget/multiselecttree/multiselecttree.popup.js
+++ b/src/widget/multiselecttree/multiselecttree.popup.js
@@ -13,6 +13,7 @@ BI.MultiSelectTreePopup = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.popup = BI.createWidget({
type: "bi.async_tree",
+ showLine: o.showLine,
element: this,
itemsCreator: o.itemsCreator
});
diff --git a/src/widget/multitree/multi.tree.popup.js b/src/widget/multitree/multi.tree.popup.js
index e39033b16..14c7165d8 100644
--- a/src/widget/multitree/multi.tree.popup.js
+++ b/src/widget/multitree/multi.tree.popup.js
@@ -27,6 +27,7 @@ BI.MultiTreePopup = BI.inherit(BI.Pane, {
this.tree = BI.createWidget(opts.el, {
type: "bi.async_tree",
+ showLine: opts.showLine,
height: 400,
cls: "popup-view-tree",
itemsCreator: opts.itemsCreator,