@giteeteam/apps-team-components 1.0.34 → 1.0.35

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.
@@ -6,4 +6,5 @@ export interface SelectValue {
6
6
  fullTitle?: string;
7
7
  children?: SelectValue[];
8
8
  parentId?: string;
9
+ disabled?: boolean;
9
10
  }
@@ -1,3 +1,4 @@
1
1
  import { SelectValue } from './types';
2
+ export declare const titleDelimiter = "/";
2
3
  export declare const toTree: (data: SelectValue[], showParentPath?: boolean) => SelectValue[];
3
4
  export declare const toFlatten: (data: SelectValue[]) => SelectValue[];
@@ -1,4 +1,4 @@
1
- const titleDelimiter = '/';
1
+ export const titleDelimiter = '/';
2
2
  const addFullTitle = (showParentPath, tree, parentTitle) => {
3
3
  if (!tree)
4
4
  return;
@@ -13,7 +13,8 @@ const addFullTitle = (showParentPath, tree, parentTitle) => {
13
13
  else {
14
14
  item.fullTitle = item.title;
15
15
  }
16
- addFullTitle(showParentPath, item.children, item.fullTitle);
16
+ const nextTitle = item.disabled ? '' : item.fullTitle;
17
+ addFullTitle(showParentPath, item.children, nextTitle);
17
18
  }
18
19
  };
19
20
  export const toTree = (data, showParentPath = false) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",