@handaotech-design/bom 0.0.45 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ export function convertBomDataToTree(treeData, nodeConfigRule) {
46
46
  firstSelectableNodeKey = node.key;
47
47
  }
48
48
  const isLeafObj = {
49
+ PROCESS_PLAN: false,
49
50
  OPERATION: true
50
51
  };
51
52
  Object.assign(node, {
@@ -53,7 +54,8 @@ export function convertBomDataToTree(treeData, nodeConfigRule) {
53
54
  title: finalTitle,
54
55
  selectable: boolSelectable,
55
56
  icon,
56
- isLeaf: isLeafObj[node.businessType] ?? !node.children?.length,
57
+ // TODO 优化逻辑,从配置中读取
58
+ isLeaf: typeof isLeafObj[node.businessType] !== "undefined" ? isLeafObj[node.businessType] : !node.children?.length,
57
59
  ...rest
58
60
  });
59
61
  const { children, ...restProps } = node;
@@ -55,6 +55,7 @@ function convertBomDataToTree(treeData, nodeConfigRule) {
55
55
  firstSelectableNodeKey = node.key;
56
56
  }
57
57
  const isLeafObj = {
58
+ PROCESS_PLAN: false,
58
59
  OPERATION: true
59
60
  };
60
61
  Object.assign(node, {
@@ -62,7 +63,8 @@ function convertBomDataToTree(treeData, nodeConfigRule) {
62
63
  title: finalTitle,
63
64
  selectable: boolSelectable,
64
65
  icon,
65
- isLeaf: isLeafObj[node.businessType] ?? !node.children?.length,
66
+ // TODO 优化逻辑,从配置中读取
67
+ isLeaf: typeof isLeafObj[node.businessType] !== "undefined" ? isLeafObj[node.businessType] : !node.children?.length,
66
68
  ...rest
67
69
  });
68
70
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handaotech-design/bom",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {