diff --git a/src/components/Cascader/Area/index.d.ts b/src/components/Cascader/Area/index.d.ts index 5b962f0..c0a1056 100644 --- a/src/components/Cascader/Area/index.d.ts +++ b/src/components/Cascader/Area/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; -interface Data { +export interface AreaCascaderItem { value: string; label: string; - children: Data[]; + children: AreaCascaderItem[]; } /** @@ -12,9 +12,9 @@ interface Data { */ export interface AreaCascaderProps extends Omit { /** 获取父级节点 */ - onGetNodePaths?: (nodes: Data[]) => void; + onGetNodePaths?: (nodes: AreaCascaderItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void; } /** diff --git a/src/components/Cascader/Dictionary/index.d.ts b/src/components/Cascader/Dictionary/index.d.ts index 1abe2f2..04d04de 100644 --- a/src/components/Cascader/Dictionary/index.d.ts +++ b/src/components/Cascader/Dictionary/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; -interface Data { +export interface DictionaryCascaderItem { dictValue: string; dictLabel: string; - children: Data[]; + children: DictionaryCascaderItem[]; [key: string]: any; } @@ -21,9 +21,9 @@ export interface DictionaryCascaderProps extends Omit void; + onGetNodePaths?: (nodes: DictionaryCascaderItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: DictionaryCascaderItem[], processedData: DictionaryCascaderItem[]) => void; } /** diff --git a/src/components/Cascader/Industry/index.d.ts b/src/components/Cascader/Industry/index.d.ts index 570a167..0dcc6c3 100644 --- a/src/components/Cascader/Industry/index.d.ts +++ b/src/components/Cascader/Industry/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; -interface Data { +export interface IndustryCascaderItem { dict_value: string; dict_label: string; - childrenList: Data[]; + childrenList: IndustryCascaderItem[]; } /** @@ -12,9 +12,9 @@ interface Data { */ export interface IndustryCascaderProps extends Omit { /** 获取父级节点 */ - onGetNodePaths?: (nodes: Data[]) => void; + onGetNodePaths?: (nodes: IndustryCascaderItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: IndustryCascaderItem[], processedData: IndustryCascaderItem[]) => void; } /** diff --git a/src/components/FormBuilder/FormItemsRenderer.d.ts b/src/components/FormBuilder/FormItemsRenderer.d.ts index 7b0616e..9624af3 100644 --- a/src/components/FormBuilder/FormItemsRenderer.d.ts +++ b/src/components/FormBuilder/FormItemsRenderer.d.ts @@ -7,7 +7,14 @@ import type { ReactElement, ReactNode } from "react"; import type { FORM_ITEM_RENDER_TYPE_MAP } from "../../enum/formItemRender"; import type { DeepPartial } from "./FormBuilder"; +/** + * Form.List name 类型 + */ export type FormListOptionName = [number, NamePath]; + +/** + * Form.List 依赖项类型 + */ export type FormListOptionDependencies = Array<(NamePath | number)[]> | NamePath; /** @@ -72,12 +79,12 @@ export interface FormListUniqueProps { /** * 条件类型辅助工具 */ -type WhenTrue = Condition extends true ? never : T; +export type WhenTrue = Condition extends true ? never : T; /** * 表单配置项属性类型辅助工具 */ -type FormOptionProperty = WhenTrue>; +export type FormOptionProperty = WhenTrue>; /** * 表单配置项公共字段 diff --git a/src/components/LeftTree/Area/index.d.ts b/src/components/LeftTree/Area/index.d.ts index 4795cb4..dd30055 100644 --- a/src/components/LeftTree/Area/index.d.ts +++ b/src/components/LeftTree/Area/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicLeftTreeProps } from "../Basic"; -interface Data { +export interface AreaLeftTreeItem { value: string; label: string; - children: Data[]; + children: AreaLeftTreeItem[]; [key: string]: any; } @@ -13,9 +13,9 @@ interface Data { */ export interface AreaLeftTreeProps extends Omit { /** 获取父级节点 */ - onGetNodePaths?: (nodes: Data[]) => void; + onGetNodePaths?: (nodes: AreaLeftTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: AreaLeftTreeItem[], processedData: AreaLeftTreeItem[]) => void; } /** diff --git a/src/components/LeftTree/Department/Gwj/index.d.ts b/src/components/LeftTree/Department/Gwj/index.d.ts index 19a16de..6bc3a88 100644 --- a/src/components/LeftTree/Department/Gwj/index.d.ts +++ b/src/components/LeftTree/Department/Gwj/index.d.ts @@ -2,10 +2,10 @@ import type { FC } from "react"; import type { DepartmentSelectTreeProps } from "../../../SelectTree/Department/Gwj"; import type { BasicLeftTreeProps } from "../../Basic"; -interface Data { +export interface DepartmentLeftTreeItem { id: string; name: string; - childrenList: Data[]; + childrenList: DepartmentLeftTreeItem[]; [key: string]: any; } @@ -18,9 +18,9 @@ export interface DepartmentLeftTreeProps extends Omit void; + onGetNodePaths?: (nodes: DepartmentLeftTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: DepartmentLeftTreeItem[], processedData: DepartmentLeftTreeItem[]) => void; } /** diff --git a/src/components/LeftTree/Dictionary/index.d.ts b/src/components/LeftTree/Dictionary/index.d.ts index 70bd978..74aac30 100644 --- a/src/components/LeftTree/Dictionary/index.d.ts +++ b/src/components/LeftTree/Dictionary/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicLeftTreeProps } from "../Basic"; -interface Data { +export interface DictionaryLeftTreeItem { dictValue: string; dictLabel: string; - children: Data[]; + children: DictionaryLeftTreeItem[]; [key: string]: any; } @@ -21,9 +21,9 @@ export interface DictionaryLeftTreeProps extends Omit void; + onGetNodePaths?: (nodes: DictionaryLeftTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: DictionaryLeftTreeItem[], processedData: DictionaryLeftTreeItem[]) => void; } /** diff --git a/src/components/Select/Dictionary/index.d.ts b/src/components/Select/Dictionary/index.d.ts index 0b30d1b..05a48c1 100644 --- a/src/components/Select/Dictionary/index.d.ts +++ b/src/components/Select/Dictionary/index.d.ts @@ -1,7 +1,7 @@ import type { FC } from "react"; import type { BasicSelectProps } from "../Basic"; -interface Data { +export interface DictionarySelectItem { dictValue: string; dictLabel: string; [key: string]: any; @@ -20,9 +20,9 @@ export interface DictionarySelectProps extends Omit void; + onGetOption?: (option: DictionarySelectItem | DictionarySelectItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[]) => void; + onGetData?: (data: DictionarySelectItem[]) => void; } /** diff --git a/src/components/Select/Personnel/Gwj/index.d.ts b/src/components/Select/Personnel/Gwj/index.d.ts index bbc5667..221da32 100644 --- a/src/components/Select/Personnel/Gwj/index.d.ts +++ b/src/components/Select/Personnel/Gwj/index.d.ts @@ -1,7 +1,7 @@ import type { FC } from "react"; import type { BasicSelectProps } from "../../Basic"; -interface Data { +export interface PersonnelSelectItem { id: string; name: string; corpinfoId: string; @@ -59,9 +59,9 @@ export interface PersonnelSelectProps extends Omit void; + onGetOption?: (option: PersonnelSelectItem | PersonnelSelectItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[]) => void; + onGetData?: (data: PersonnelSelectItem[]) => void; } /** diff --git a/src/components/SelectTree/Area/index.d.ts b/src/components/SelectTree/Area/index.d.ts index b4e60d4..8b82ddf 100644 --- a/src/components/SelectTree/Area/index.d.ts +++ b/src/components/SelectTree/Area/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; -interface Data { +export interface AreaSelectTreeItem { value: string; label: string; - children: Data[]; + children: AreaSelectTreeItem[]; } /** @@ -12,9 +12,9 @@ interface Data { */ export interface AreaSelectTreeProps extends Omit { /** 获取父级节点 */ - onGetNodePaths?: (nodes: Data[]) => void; + onGetNodePaths?: (nodes: AreaSelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: AreaSelectTreeItem[], processedData: AreaSelectTreeItem[]) => void; } /** diff --git a/src/components/SelectTree/Department/Gwj/index.d.ts b/src/components/SelectTree/Department/Gwj/index.d.ts index 8f4706b..79a06e2 100644 --- a/src/components/SelectTree/Department/Gwj/index.d.ts +++ b/src/components/SelectTree/Department/Gwj/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; -interface Data { +export interface DepartmentSelectTreeItem { id: string; name: string; - childrenList: Data[]; + childrenList: DepartmentSelectTreeItem[]; [key: string]: any; } @@ -47,9 +47,9 @@ export interface DepartmentSelectTreeProps extends Omit void; + onGetNodePaths?: (nodes: DepartmentSelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void; } /** diff --git a/src/components/SelectTree/Dictionary/index.d.ts b/src/components/SelectTree/Dictionary/index.d.ts index 65eaffa..1458551 100644 --- a/src/components/SelectTree/Dictionary/index.d.ts +++ b/src/components/SelectTree/Dictionary/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; -interface Data { +export interface DictionarySelectTreeItem { dictValue: string; dictLabel: string; - children: Data[]; + children: DictionarySelectTreeItem[]; [key: string]: any; } @@ -21,9 +21,9 @@ export interface DictionarySelectTreeProps extends Omit void; + onGetNodePaths?: (nodes: DictionarySelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: DictionarySelectTreeItem[], processedData: DictionarySelectTreeItem[]) => void; } /** diff --git a/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts b/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts index 7bec891..a5185c4 100644 --- a/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts +++ b/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; -interface Data { +export interface HiddenLevelSelectTreeItem { dictValue: string; dictLabel: string; - children: Data[]; + children: HiddenLevelSelectTreeItem[]; [key: string]: any; } @@ -19,9 +19,9 @@ export interface HiddenLevelSelectTreeProps extends Omit void; + onGetNodePaths?: (nodes: HiddenLevelSelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void; } /** diff --git a/src/components/SelectTree/HiddenPart/Gwj/index.d.ts b/src/components/SelectTree/HiddenPart/Gwj/index.d.ts index a73e49f..e432e14 100644 --- a/src/components/SelectTree/HiddenPart/Gwj/index.d.ts +++ b/src/components/SelectTree/HiddenPart/Gwj/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; -interface Data { +export interface HiddenPartSelectTreeItem { hiddenregionId: string; hiddenregion: string; - children: Data[]; + children: HiddenPartSelectTreeItem[]; [key: string]: any; } @@ -25,9 +25,9 @@ export interface HiddenPartSelectTreeProps extends Omit void; + onGetNodePaths?: (nodes: HiddenPartSelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: HiddenPartSelectTreeItem[], processedData: HiddenPartSelectTreeItem[]) => void; } /** diff --git a/src/components/SelectTree/Industry/index.d.ts b/src/components/SelectTree/Industry/index.d.ts index 33241de..5863260 100644 --- a/src/components/SelectTree/Industry/index.d.ts +++ b/src/components/SelectTree/Industry/index.d.ts @@ -1,10 +1,10 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; -interface Data { +export interface IndustrySelectTreeItem { dict_value: string; dict_label: string; - childrenList: Data[]; + childrenList: IndustrySelectTreeItem[]; } /** @@ -12,9 +12,9 @@ interface Data { */ export interface IndustrySelectTreeProps extends Omit { /** 获取父级节点 */ - onGetNodePaths?: (nodes: Data[]) => void; + onGetNodePaths?: (nodes: IndustrySelectTreeItem[]) => void; /** 获取数据 */ - onGetData?: (data: Data[], processedData: Data[]) => void; + onGetData?: (data: IndustrySelectTreeItem[], processedData: IndustrySelectTreeItem[]) => void; } /** diff --git a/src/hooks/useGetFile/index.d.ts b/src/hooks/useGetFile/index.d.ts index b6ed5b3..b66890a 100644 --- a/src/hooks/useGetFile/index.d.ts +++ b/src/hooks/useGetFile/index.d.ts @@ -1,4 +1,4 @@ -export interface FileItem { +export interface GetFileItem { /** 文件路径 */ filePath: string; /** 文件名称 */ @@ -33,9 +33,9 @@ export interface MultipleGetFileOptions extends BaseParams { dataSource: Record[]; } -export type SingleFileResponse = FileItem[]; +export type SingleFileResponse = GetFileItem[]; -export type MultipleFileResponse = Array & { files: FileItem[] }>; +export type MultipleFileResponse = Array & { files: GetFileItem[] }>; export interface GetFileFunction { (options: SingleGetFileOptions): Promise; diff --git a/src/hooks/useGetUserInfo/index.d.ts b/src/hooks/useGetUserInfo/index.d.ts index 7aae5d8..272f723 100644 --- a/src/hooks/useGetUserInfo/index.d.ts +++ b/src/hooks/useGetUserInfo/index.d.ts @@ -1,4 +1,4 @@ -interface Data { +interface UserInfoData { corpinfoId: string; corpinfoName: string; departmentId: string; @@ -12,7 +12,7 @@ interface Data { [key: string]: any; } -export type getUserInfoFunction = () => Promise; +export type getUserInfoFunction = () => Promise; /** * 获取用户信息