Browse Source

Merge pull request #135584 in DEC/fineui from master to feature/x

* commit 'd29743666532a68a0aa11f996ef1f7d37743045e':
  KERNEL-10683 feat: 提供不显示连接线配置
es6
superman 2 years ago
parent
commit
8dd9549264
  1. 2
      src/case/tree/treeexpander/tree.expander.js
  2. 10
      src/case/tree/treeexpander/tree.expander.popup.js

2
src/case/tree/treeexpander/tree.expander.js

@ -6,6 +6,7 @@
isLastNode: false, // 是不是最后一个 isLastNode: false, // 是不是最后一个
isFirstNode: false, // 是不是第一个 isFirstNode: false, // 是不是第一个
selectable: false, selectable: false,
showLine: true,
}, },
render: function () { render: function () {
@ -33,6 +34,7 @@
layer: o.layer || o.el.layer, layer: o.layer || o.el.layer,
isLastNode: o.isLastNode || o.el.isLastNode, isLastNode: o.isLastNode || o.el.isLastNode,
isFirstNode: o.isFirstNode || o.el.isFirstNode, isFirstNode: o.isFirstNode || o.el.isFirstNode,
showLine: o.showLine,
el: o.popup, el: o.popup,
}, },
value: o.value, value: o.value,

10
src/case/tree/treeexpander/tree.expander.popup.js

@ -6,6 +6,7 @@
layer: 0, // 第几层级 layer: 0, // 第几层级
el: {}, el: {},
isLastNode: false, isLastNode: false,
showLine: true,
}; };
}, },
@ -22,12 +23,15 @@
this.popupView.on(BI.Controller.EVENT_CHANGE, function () { this.popupView.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
this.popupView.element.css("margin-left", -offset * (o.layer + 1));
this.element.css("margin-left", offset * (o.layer + 1)); if (o.showLine) {
this.popupView.element.css("margin-left", -offset * (o.layer + 1));
this.element.css("margin-left", offset * (o.layer + 1));
}
return { return {
type: "bi.vertical", type: "bi.vertical",
cls: !o.isLastNode ? (BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? "line solid" : "line") : "", cls: (o.showLine && !o.isLastNode) ? (BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? "line solid" : "line") : "",
scrolly: null, scrolly: null,
items: [ items: [
this.popupView, this.popupView,

Loading…
Cancel
Save