Browse Source

KERNEL-10683 feat: 提供不显示连接线配置

es6
zsmj 2 years ago
parent
commit
20bd88b2e5
  1. 2
      src/case/tree/treeexpander/tree.expander.js
  2. 6
      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,

6
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);
}); });
if (o.showLine) {
this.popupView.element.css("margin-left", -offset * (o.layer + 1)); this.popupView.element.css("margin-left", -offset * (o.layer + 1));
this.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