Browse Source

KERNEL-10683 && DESIGN-4160 feat: 整理简化FIneUI树控件的node和item,同时支持父节点不可选中但可以展开收起功能

es6
zsmj 2 years ago
parent
commit
6b96ebdc62
  1. 17
      src/widget/selecttree/selecttree.popup.js

17
src/widget/selecttree/selecttree.popup.js

@ -30,27 +30,10 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
extend.type = "bi.tree_node"; extend.type = "bi.tree_node";
extend.selectable = true; extend.selectable = true;
// if (i === nodes.length - 1) {
// extend.type = "bi.select_tree_last_plus_group_node";
// extend.isLastNode = true;
// }
// if (i === 0 && !pNode) {
// extend.type = "bi.select_tree_first_plus_group_node";
// }
// if (i === 0 && i === nodes.length - 1) { // 根
// extend.type = "bi.select_tree_plus_group_node";
// }
BI.defaults(node, extend); BI.defaults(node, extend);
self._formatItems(node.children, layer + 1, node); self._formatItems(node.children, layer + 1, node);
} else { } else {
extend.type = "bi.tree_item"; extend.type = "bi.tree_item";
// extend.type = "bi.mid_tree_leaf_item";
// if (i === 0 && !pNode) {
// extend.type = "bi.first_tree_leaf_item";
// }
// if (i === nodes.length - 1) {
// extend.type = "bi.last_tree_leaf_item";
// }
BI.defaults(node, extend); BI.defaults(node, extend);
} }
}); });

Loading…
Cancel
Save