zy-react-library 1.3.9 → 1.3.11
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.
- package/components/Cascader/Area/index.d.ts +4 -4
- package/components/Cascader/Dictionary/index.d.ts +4 -4
- package/components/Cascader/Industry/index.d.ts +4 -4
- package/components/FormBuilder/FormItemsRenderer.d.ts +9 -2
- package/components/LeftTree/Area/index.d.ts +4 -4
- package/components/LeftTree/Department/Gwj/index.d.ts +4 -4
- package/components/LeftTree/Dictionary/index.d.ts +4 -4
- package/components/Select/Dictionary/index.d.ts +3 -3
- package/components/Select/Personnel/Gwj/index.d.ts +3 -3
- package/components/SelectTree/Area/index.d.ts +4 -4
- package/components/SelectTree/Department/Gwj/index.d.ts +4 -4
- package/components/SelectTree/Dictionary/index.d.ts +4 -4
- package/components/SelectTree/HiddenLevel/Gwj/index.d.ts +4 -4
- package/components/SelectTree/HiddenPart/Gwj/index.d.ts +4 -4
- package/components/SelectTree/Industry/index.d.ts +4 -4
- package/hooks/useDeleteFile/index.d.ts +1 -1
- package/hooks/useDownloadBlob/index.d.ts +1 -1
- package/hooks/useGetFile/index.d.ts +3 -3
- package/hooks/useGetUserInfo/index.d.ts +2 -2
- package/package.json +1 -1
- package/utils/index.d.ts +13 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicCascaderProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface AreaCascaderItem {
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
7
|
-
children:
|
|
7
|
+
children: AreaCascaderItem[];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,9 +12,9 @@ interface Data {
|
|
|
12
12
|
*/
|
|
13
13
|
export interface AreaCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
|
14
14
|
/** 获取父级节点 */
|
|
15
|
-
onGetNodePaths?: (nodes:
|
|
15
|
+
onGetNodePaths?: (nodes: AreaCascaderItem[]) => void;
|
|
16
16
|
/** 获取数据 */
|
|
17
|
-
onGetData?: (data:
|
|
17
|
+
onGetData?: (data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicCascaderProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface DictionaryCascaderItem {
|
|
5
5
|
dictValue: string;
|
|
6
6
|
dictLabel: string;
|
|
7
|
-
children:
|
|
7
|
+
children: DictionaryCascaderItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -21,9 +21,9 @@ export interface DictionaryCascaderProps extends Omit<BasicCascaderProps, "optio
|
|
|
21
21
|
/** 树形数据 value 字段,默认 dictValue */
|
|
22
22
|
idKey?: string;
|
|
23
23
|
/** 获取父级节点 */
|
|
24
|
-
onGetNodePaths?: (nodes:
|
|
24
|
+
onGetNodePaths?: (nodes: DictionaryCascaderItem[]) => void;
|
|
25
25
|
/** 获取数据 */
|
|
26
|
-
onGetData?: (data:
|
|
26
|
+
onGetData?: (data: DictionaryCascaderItem[], processedData: DictionaryCascaderItem[]) => void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicCascaderProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface IndustryCascaderItem {
|
|
5
5
|
dict_value: string;
|
|
6
6
|
dict_label: string;
|
|
7
|
-
childrenList:
|
|
7
|
+
childrenList: IndustryCascaderItem[];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,9 +12,9 @@ interface Data {
|
|
|
12
12
|
*/
|
|
13
13
|
export interface IndustryCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
|
14
14
|
/** 获取父级节点 */
|
|
15
|
-
onGetNodePaths?: (nodes:
|
|
15
|
+
onGetNodePaths?: (nodes: IndustryCascaderItem[]) => void;
|
|
16
16
|
/** 获取数据 */
|
|
17
|
-
onGetData?: (data:
|
|
17
|
+
onGetData?: (data: IndustryCascaderItem[], processedData: IndustryCascaderItem[]) => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -7,7 +7,14 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
7
7
|
import type { FORM_ITEM_RENDER_TYPE_MAP } from "../../enum/formItemRender";
|
|
8
8
|
import type { DeepPartial } from "./FormBuilder";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Form.List name 类型
|
|
12
|
+
*/
|
|
10
13
|
export type FormListOptionName<Values> = [number, NamePath<Values>];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Form.List 依赖项类型
|
|
17
|
+
*/
|
|
11
18
|
export type FormListOptionDependencies<Values> = Array<(NamePath<Values> | number)[]> | NamePath<Values>;
|
|
12
19
|
|
|
13
20
|
/**
|
|
@@ -72,12 +79,12 @@ export interface FormListUniqueProps<Values = any, AllValues = Values> {
|
|
|
72
79
|
/**
|
|
73
80
|
* 条件类型辅助工具
|
|
74
81
|
*/
|
|
75
|
-
type WhenTrue<Condition extends boolean, T> = Condition extends true ? never : T;
|
|
82
|
+
export type WhenTrue<Condition extends boolean, T> = Condition extends true ? never : T;
|
|
76
83
|
|
|
77
84
|
/**
|
|
78
85
|
* 表单配置项属性类型辅助工具
|
|
79
86
|
*/
|
|
80
|
-
type FormOptionProperty<IsOnlyForLabel extends boolean, IsCustomizeRender extends boolean, T> = WhenTrue<IsOnlyForLabel, WhenTrue<IsCustomizeRender, T>>;
|
|
87
|
+
export type FormOptionProperty<IsOnlyForLabel extends boolean, IsCustomizeRender extends boolean, T> = WhenTrue<IsOnlyForLabel, WhenTrue<IsCustomizeRender, T>>;
|
|
81
88
|
|
|
82
89
|
/**
|
|
83
90
|
* 表单配置项公共字段
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicLeftTreeProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface AreaLeftTreeItem {
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
7
|
-
children:
|
|
7
|
+
children: AreaLeftTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -13,9 +13,9 @@ interface Data {
|
|
|
13
13
|
*/
|
|
14
14
|
export interface AreaLeftTreeProps extends Omit<BasicLeftTreeProps, "treeData" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
|
15
15
|
/** 获取父级节点 */
|
|
16
|
-
onGetNodePaths?: (nodes:
|
|
16
|
+
onGetNodePaths?: (nodes: AreaLeftTreeItem[]) => void;
|
|
17
17
|
/** 获取数据 */
|
|
18
|
-
onGetData?: (data:
|
|
18
|
+
onGetData?: (data: AreaLeftTreeItem[], processedData: AreaLeftTreeItem[]) => void;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -2,10 +2,10 @@ import type { FC } from "react";
|
|
|
2
2
|
import type { DepartmentSelectTreeProps } from "../../../SelectTree/Department/Gwj";
|
|
3
3
|
import type { BasicLeftTreeProps } from "../../Basic";
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
export interface DepartmentLeftTreeItem {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
|
-
childrenList:
|
|
8
|
+
childrenList: DepartmentLeftTreeItem[];
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -18,9 +18,9 @@ export interface DepartmentLeftTreeProps extends Omit<BasicLeftTreeProps, "treeD
|
|
|
18
18
|
/** 查询的企业类型 */
|
|
19
19
|
searchType?: DepartmentSelectTreeProps["searchType"];
|
|
20
20
|
/** 获取父级节点 */
|
|
21
|
-
onGetNodePaths?: (nodes:
|
|
21
|
+
onGetNodePaths?: (nodes: DepartmentLeftTreeItem[]) => void;
|
|
22
22
|
/** 获取数据 */
|
|
23
|
-
onGetData?: (data:
|
|
23
|
+
onGetData?: (data: DepartmentLeftTreeItem[], processedData: DepartmentLeftTreeItem[]) => void;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicLeftTreeProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface DictionaryLeftTreeItem {
|
|
5
5
|
dictValue: string;
|
|
6
6
|
dictLabel: string;
|
|
7
|
-
children:
|
|
7
|
+
children: DictionaryLeftTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -21,9 +21,9 @@ export interface DictionaryLeftTreeProps extends Omit<BasicLeftTreeProps, "treeD
|
|
|
21
21
|
/** 树形数据 value 字段,默认 dictValue */
|
|
22
22
|
idKey?: string;
|
|
23
23
|
/** 获取父级节点 */
|
|
24
|
-
onGetNodePaths?: (nodes:
|
|
24
|
+
onGetNodePaths?: (nodes: DictionaryLeftTreeItem[]) => void;
|
|
25
25
|
/** 获取数据 */
|
|
26
|
-
onGetData?: (data:
|
|
26
|
+
onGetData?: (data: DictionaryLeftTreeItem[], processedData: DictionaryLeftTreeItem[]) => void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface DictionarySelectItem {
|
|
5
5
|
dictValue: string;
|
|
6
6
|
dictLabel: string;
|
|
7
7
|
[key: string]: any;
|
|
@@ -20,9 +20,9 @@ export interface DictionarySelectProps extends Omit<BasicSelectProps, "data" | "
|
|
|
20
20
|
/** 树形数据 value 字段,默认 dictValue */
|
|
21
21
|
idKey?: string;
|
|
22
22
|
/** 获取选中的项 */
|
|
23
|
-
onGetOption?: (option:
|
|
23
|
+
onGetOption?: (option: DictionarySelectItem | DictionarySelectItem[]) => void;
|
|
24
24
|
/** 获取数据 */
|
|
25
|
-
onGetData?: (data:
|
|
25
|
+
onGetData?: (data: DictionarySelectItem[]) => void;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectProps } from "../../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface PersonnelSelectItem {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
7
|
corpinfoId: string;
|
|
@@ -59,9 +59,9 @@ export interface PersonnelSelectProps extends Omit<BasicSelectProps, "data" | "p
|
|
|
59
59
|
/** 额外请求参数 */
|
|
60
60
|
extraParams?: ExtraParams;
|
|
61
61
|
/** 获取选中的项 */
|
|
62
|
-
onGetOption?: (option:
|
|
62
|
+
onGetOption?: (option: PersonnelSelectItem | PersonnelSelectItem[]) => void;
|
|
63
63
|
/** 获取数据 */
|
|
64
|
-
onGetData?: (data:
|
|
64
|
+
onGetData?: (data: PersonnelSelectItem[]) => void;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface AreaSelectTreeItem {
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
7
|
-
children:
|
|
7
|
+
children: AreaSelectTreeItem[];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,9 +12,9 @@ interface Data {
|
|
|
12
12
|
*/
|
|
13
13
|
export interface AreaSelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
|
14
14
|
/** 获取父级节点 */
|
|
15
|
-
onGetNodePaths?: (nodes:
|
|
15
|
+
onGetNodePaths?: (nodes: AreaSelectTreeItem[]) => void;
|
|
16
16
|
/** 获取数据 */
|
|
17
|
-
onGetData?: (data:
|
|
17
|
+
onGetData?: (data: AreaSelectTreeItem[], processedData: AreaSelectTreeItem[]) => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface DepartmentSelectTreeItem {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
|
-
childrenList:
|
|
7
|
+
childrenList: DepartmentSelectTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -47,9 +47,9 @@ export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "t
|
|
|
47
47
|
/** 查询的企业类型,默认current,current 接收 eqCorpinfoId 或者 eqParentId,all 不接受任何参数,inType 接收 inType 或者 enterpriseType */
|
|
48
48
|
searchType?: "current" | "all" | "inType";
|
|
49
49
|
/** 获取父级节点 */
|
|
50
|
-
onGetNodePaths?: (nodes:
|
|
50
|
+
onGetNodePaths?: (nodes: DepartmentSelectTreeItem[]) => void;
|
|
51
51
|
/** 获取数据 */
|
|
52
|
-
onGetData?: (data:
|
|
52
|
+
onGetData?: (data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface DictionarySelectTreeItem {
|
|
5
5
|
dictValue: string;
|
|
6
6
|
dictLabel: string;
|
|
7
|
-
children:
|
|
7
|
+
children: DictionarySelectTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -21,9 +21,9 @@ export interface DictionarySelectTreeProps extends Omit<BasicSelectTreeProps, "t
|
|
|
21
21
|
/** 树形数据 value 字段,默认 dictValue */
|
|
22
22
|
idKey?: string;
|
|
23
23
|
/** 获取父级节点 */
|
|
24
|
-
onGetNodePaths?: (nodes:
|
|
24
|
+
onGetNodePaths?: (nodes: DictionarySelectTreeItem[]) => void;
|
|
25
25
|
/** 获取数据 */
|
|
26
|
-
onGetData?: (data:
|
|
26
|
+
onGetData?: (data: DictionarySelectTreeItem[], processedData: DictionarySelectTreeItem[]) => void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface HiddenLevelSelectTreeItem {
|
|
5
5
|
dictValue: string;
|
|
6
6
|
dictLabel: string;
|
|
7
|
-
children:
|
|
7
|
+
children: HiddenLevelSelectTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -19,9 +19,9 @@ export interface HiddenLevelSelectTreeProps extends Omit<BasicSelectTreeProps, "
|
|
|
19
19
|
/** 是否显示重大隐患,默认 true */
|
|
20
20
|
isShowMajor?: boolean;
|
|
21
21
|
/** 获取父级节点 */
|
|
22
|
-
onGetNodePaths?: (nodes:
|
|
22
|
+
onGetNodePaths?: (nodes: HiddenLevelSelectTreeItem[]) => void;
|
|
23
23
|
/** 获取数据 */
|
|
24
|
-
onGetData?: (data:
|
|
24
|
+
onGetData?: (data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface HiddenPartSelectTreeItem {
|
|
5
5
|
hiddenregionId: string;
|
|
6
6
|
hiddenregion: string;
|
|
7
|
-
children:
|
|
7
|
+
children: HiddenPartSelectTreeItem[];
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -25,9 +25,9 @@ export interface HiddenPartSelectTreeProps extends Omit<BasicSelectTreeProps, "t
|
|
|
25
25
|
/** 是否需要企业id,默认 false */
|
|
26
26
|
isNeedCorpInfoId?: boolean;
|
|
27
27
|
/** 获取父级节点 */
|
|
28
|
-
onGetNodePaths?: (nodes:
|
|
28
|
+
onGetNodePaths?: (nodes: HiddenPartSelectTreeItem[]) => void;
|
|
29
29
|
/** 获取数据 */
|
|
30
|
-
onGetData?: (data:
|
|
30
|
+
onGetData?: (data: HiddenPartSelectTreeItem[], processedData: HiddenPartSelectTreeItem[]) => void;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { BasicSelectTreeProps } from "../Basic";
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface IndustrySelectTreeItem {
|
|
5
5
|
dict_value: string;
|
|
6
6
|
dict_label: string;
|
|
7
|
-
childrenList:
|
|
7
|
+
childrenList: IndustrySelectTreeItem[];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,9 +12,9 @@ interface Data {
|
|
|
12
12
|
*/
|
|
13
13
|
export interface IndustrySelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
|
14
14
|
/** 获取父级节点 */
|
|
15
|
-
onGetNodePaths?: (nodes:
|
|
15
|
+
onGetNodePaths?: (nodes: IndustrySelectTreeItem[]) => void;
|
|
16
16
|
/** 获取数据 */
|
|
17
|
-
onGetData?: (data:
|
|
17
|
+
onGetData?: (data: IndustrySelectTreeItem[], processedData: IndustrySelectTreeItem[]) => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -7,7 +7,7 @@ interface UseDownloadBlobOptions {
|
|
|
7
7
|
params?: Record<string, any>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export type DownloadBlobFunction = (url: string, options?: UseDownloadBlobOptions) => Promise<
|
|
10
|
+
export type DownloadBlobFunction = (url: string, options?: UseDownloadBlobOptions) => Promise<{ data: Blob }>;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* 下载Blob流文件
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface GetFileItem {
|
|
2
2
|
/** 文件路径 */
|
|
3
3
|
filePath: string;
|
|
4
4
|
/** 文件名称 */
|
|
@@ -33,9 +33,9 @@ export interface MultipleGetFileOptions extends BaseParams {
|
|
|
33
33
|
dataSource: Record<string, any>[];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export type SingleFileResponse =
|
|
36
|
+
export type SingleFileResponse = GetFileItem[];
|
|
37
37
|
|
|
38
|
-
export type MultipleFileResponse = Array<Record<string, any> & { files:
|
|
38
|
+
export type MultipleFileResponse = Array<Record<string, any> & { files: GetFileItem[] }>;
|
|
39
39
|
|
|
40
40
|
export interface GetFileFunction {
|
|
41
41
|
(options: SingleGetFileOptions): Promise<SingleFileResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface UserInfoData {
|
|
2
2
|
corpinfoId: string;
|
|
3
3
|
corpinfoName: string;
|
|
4
4
|
departmentId: string;
|
|
@@ -12,7 +12,7 @@ interface Data {
|
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export type getUserInfoFunction = () => Promise<
|
|
15
|
+
export type getUserInfoFunction = () => Promise<UserInfoData>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* 获取用户信息
|
package/package.json
CHANGED
package/utils/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export function image2Base642(file: File): Promise<string>;
|
|
|
81
81
|
/**
|
|
82
82
|
* 判断图片是否可访问成功
|
|
83
83
|
*/
|
|
84
|
-
export function checkImgExists(imgUrl: string): Promise<
|
|
84
|
+
export function checkImgExists(imgUrl: string): Promise<Event>;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* 获取数据类型
|
|
@@ -135,7 +135,7 @@ export function getUrlParam(key: string): string;
|
|
|
135
135
|
*/
|
|
136
136
|
export function paging<T>(options: {
|
|
137
137
|
/** 分页的数组 */
|
|
138
|
-
list: any[];
|
|
138
|
+
list: Record<string, any>[];
|
|
139
139
|
/** 当前页 */
|
|
140
140
|
currentPage: number | string;
|
|
141
141
|
/** 每页条数 */
|
|
@@ -184,7 +184,7 @@ export function getLabelName<T>(options: {
|
|
|
184
184
|
/** 状态 */
|
|
185
185
|
status: number | string;
|
|
186
186
|
/** 翻译的数组 */
|
|
187
|
-
list: any[];
|
|
187
|
+
list: Record<string, any>[];
|
|
188
188
|
/** id字段名 */
|
|
189
189
|
idKey?: string;
|
|
190
190
|
/** name字段名 */
|
|
@@ -206,7 +206,7 @@ export function idCardGetDateAndGender(idCard: string): { sex: "1" | "0"; date:
|
|
|
206
206
|
*/
|
|
207
207
|
export function getMatchedItems<T>(options: {
|
|
208
208
|
/** 获取的数组 */
|
|
209
|
-
list: any[];
|
|
209
|
+
list: Record<string, any>[];
|
|
210
210
|
/** 获取的值 */
|
|
211
211
|
value: (number | string)[];
|
|
212
212
|
/** 获取的id字段名 */
|
|
@@ -218,7 +218,7 @@ export function getMatchedItems<T>(options: {
|
|
|
218
218
|
*/
|
|
219
219
|
export function getUnmatchedItems<T>(options: {
|
|
220
220
|
/** 获取的数组 */
|
|
221
|
-
list: any[];
|
|
221
|
+
list: Record<string, any>[];
|
|
222
222
|
/** 获取的值 */
|
|
223
223
|
value: (number | string)[];
|
|
224
224
|
/** 获取的id字段名 */
|
|
@@ -230,7 +230,7 @@ export function getUnmatchedItems<T>(options: {
|
|
|
230
230
|
*/
|
|
231
231
|
export function listTransTree<T>(options: {
|
|
232
232
|
/** 需要转换的json */
|
|
233
|
-
json: any[];
|
|
233
|
+
json: Record<string, any>[];
|
|
234
234
|
/** id字段 */
|
|
235
235
|
idKey: string;
|
|
236
236
|
/** 父级id字段 */
|
|
@@ -289,7 +289,7 @@ export function base642File(base64: string, filename?: string): File;
|
|
|
289
289
|
export function getTreeNodePaths<T extends Record<string, any> = Record<string, any>>(
|
|
290
290
|
options: {
|
|
291
291
|
/** 树形数据 */
|
|
292
|
-
data: any[];
|
|
292
|
+
data: Record<string, any>[];
|
|
293
293
|
/** 目标节点ID */
|
|
294
294
|
targetId: string | number;
|
|
295
295
|
/** id字段名 */
|
|
@@ -297,7 +297,7 @@ export function getTreeNodePaths<T extends Record<string, any> = Record<string,
|
|
|
297
297
|
/** 子节点字段名 */
|
|
298
298
|
childrenKey: string;
|
|
299
299
|
/** 路径数组 */
|
|
300
|
-
path?: any[];
|
|
300
|
+
path?: Record<string, any>[];
|
|
301
301
|
/** 是否包含自身 */
|
|
302
302
|
isIncludeOneself?: boolean;
|
|
303
303
|
},
|
|
@@ -309,7 +309,7 @@ export function getTreeNodePaths<T extends Record<string, any> = Record<string,
|
|
|
309
309
|
export function processTreeDataByLevel(
|
|
310
310
|
options: {
|
|
311
311
|
/** 树形数据 */
|
|
312
|
-
data: any[];
|
|
312
|
+
data: Record<string, any>[];
|
|
313
313
|
/** 层级限制 */
|
|
314
314
|
level?: number;
|
|
315
315
|
/** 子节点字段名 */
|
|
@@ -330,7 +330,7 @@ export function processTreeDataByLevel(
|
|
|
330
330
|
export function processTreeDataForOnlyLastLevel(
|
|
331
331
|
options: {
|
|
332
332
|
/** 树形数据 */
|
|
333
|
-
data: any[];
|
|
333
|
+
data: Record<string, any>[];
|
|
334
334
|
/** 子节点字段名 */
|
|
335
335
|
childrenKey: string;
|
|
336
336
|
/** 是否只允许选择最后一级 */
|
|
@@ -347,21 +347,21 @@ export function processTreeDataForOnlyLastLevel(
|
|
|
347
347
|
* 验证结束时间是否大于开始时间
|
|
348
348
|
*/
|
|
349
349
|
export function validatorEndTime(options: { startTime: string; message?: string; type?: "date" | "datetime" }): {
|
|
350
|
-
validator: (_: any, value: any) => Promise<void |
|
|
350
|
+
validator: (_: any, value: any) => Promise<void | any> | void;
|
|
351
351
|
};
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* 验证时间是否大于当前时间
|
|
355
355
|
*/
|
|
356
356
|
export function validatorTimeGTCurrentDay(options?: { message?: string; type?: "date" | "datetime" }): {
|
|
357
|
-
validator: (_: any, value: any) => Promise<void |
|
|
357
|
+
validator: (_: any, value: any) => Promise<void | any> | void;
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* 验证时间是否大于等于当前时间
|
|
362
362
|
*/
|
|
363
363
|
export function validatorTimeGECurrentDay(options?: { message?: string; type?: "date" | "datetime" }): {
|
|
364
|
-
validator: (_: any, value: any) => Promise<void |
|
|
364
|
+
validator: (_: any, value: any) => Promise<void | any> | void;
|
|
365
365
|
};
|
|
366
366
|
|
|
367
367
|
/**
|