hlyc-web-pack 3.8.2 → 4.0.0-beta.1
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/lib/Affix/index.d.ts +7 -7
- package/lib/ButtonGroup/index.d.ts +29 -29
- package/lib/Dialog/index.d.ts +24 -24
- package/lib/Empty/index.d.ts +11 -9
- package/lib/GaoDeMap/index.d.ts +23 -23
- package/lib/GenerateForm/index.d.ts +141 -143
- package/lib/GenerateTable/EditableCell/index.d.ts +74 -75
- package/lib/GenerateTable/ResizableTitle/index.d.ts +3 -2
- package/lib/GenerateTable/index.d.ts +115 -115
- package/lib/IconSelectionModal/index.d.ts +16 -16
- package/lib/LayoutFormModal/index.d.ts +74 -73
- package/lib/LayoutTableModal/index.d.ts +95 -95
- package/lib/QuicklyProcessForms/index.d.ts +31 -31
- package/lib/TreeNode/index.d.ts +48 -48
- package/lib/Upload/index.d.ts +26 -26
- package/lib/VirtualList/index.d.ts +24 -24
- package/lib/brother/ConfigProvider/index.d.ts +8 -8
- package/lib/brother/DndWrap/index.d.ts +6 -4
- package/lib/brother/hooks/index.d.ts +16 -17
- package/lib/brother/hooks/useDeepCompareEffect/index.d.ts +7 -7
- package/lib/brother/hooks/useLatest/index.d.ts +2 -3
- package/lib/brother/hooks/useMemoizedFn/index.d.ts +3 -3
- package/lib/brother/hooks/useMethods/index.d.ts +2 -2
- package/lib/brother/hooks/useMount/index.d.ts +2 -2
- package/lib/brother/hooks/useSetState/index.d.ts +2 -2
- package/lib/brother/hooks/useToggle/index.d.ts +10 -10
- package/lib/brother/hooks/useUnmount/index.d.ts +2 -2
- package/lib/brother/hooks/useUpdateEffect/index.d.ts +4 -4
- package/lib/brother/typings/index.d.ts +37 -37
- package/lib/brother/utils/index.d.ts +53 -54
- package/lib/index.cjs.js +25 -0
- package/lib/index.cjs.js.map +1 -0
- package/lib/index.d.ts +16 -16
- package/lib/index.esm.js +25 -0
- package/lib/index.esm.js.map +1 -0
- package/package.json +29 -37
- package/lib/index.js +0 -23
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { FormListType } from '../GenerateForm';
|
|
2
|
-
import { AjaxResultType, AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export interface QuicklyProcessTypes {
|
|
5
|
-
/** 打开或关闭 */
|
|
6
|
-
visible: boolean;
|
|
7
|
-
id?: string | null | undefined;
|
|
8
|
-
/** 弹窗标题 */
|
|
9
|
-
title?: string | null | undefined;
|
|
10
|
-
/** 弹窗宽度 */
|
|
11
|
-
width?: number;
|
|
12
|
-
/** 需要转换成时间格式的参数 */
|
|
13
|
-
transformTime?: string[];
|
|
14
|
-
/** 处理数据 */
|
|
15
|
-
data: AnyObjectType[];
|
|
16
|
-
/** 表单数据 */
|
|
17
|
-
formList: FormListType[];
|
|
18
|
-
/** 分页请求的额外参数 */
|
|
19
|
-
methodParams?: AnyObjectType;
|
|
20
|
-
/** 分页列表请求函数 */
|
|
21
|
-
apiMethod?: (data: any) => PromiseAxiosResultType;
|
|
22
|
-
/** 提交表单的接口 */
|
|
23
|
-
submitApi: (data: any, method: 'put' | 'post') => Promise<AjaxResultType>;
|
|
24
|
-
/** 上一页下一页切换回调 */
|
|
25
|
-
onChange?: (data: AnyObjectType, pageObj?: AnyObjectType) => void;
|
|
26
|
-
/** 关闭弹窗回调 */
|
|
27
|
-
onCancel?: (pageObj?: AnyObjectType) => void;
|
|
28
|
-
}
|
|
29
|
-
/** 批量编辑,用来编辑表格列表数据 */
|
|
30
|
-
declare const QuicklyProcessForms: (props: QuicklyProcessTypes) => JSX.Element;
|
|
31
|
-
export default QuicklyProcessForms;
|
|
1
|
+
import { FormListType } from '../GenerateForm';
|
|
2
|
+
import { AjaxResultType, AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface QuicklyProcessTypes {
|
|
5
|
+
/** 打开或关闭 */
|
|
6
|
+
visible: boolean;
|
|
7
|
+
id?: string | null | undefined;
|
|
8
|
+
/** 弹窗标题 */
|
|
9
|
+
title?: string | null | undefined;
|
|
10
|
+
/** 弹窗宽度 */
|
|
11
|
+
width?: number;
|
|
12
|
+
/** 需要转换成时间格式的参数 */
|
|
13
|
+
transformTime?: string[];
|
|
14
|
+
/** 处理数据 */
|
|
15
|
+
data: AnyObjectType[];
|
|
16
|
+
/** 表单数据 */
|
|
17
|
+
formList: FormListType[];
|
|
18
|
+
/** 分页请求的额外参数 */
|
|
19
|
+
methodParams?: AnyObjectType;
|
|
20
|
+
/** 分页列表请求函数 */
|
|
21
|
+
apiMethod?: (data: any) => PromiseAxiosResultType;
|
|
22
|
+
/** 提交表单的接口 */
|
|
23
|
+
submitApi: (data: any, method: 'put' | 'post') => Promise<AjaxResultType>;
|
|
24
|
+
/** 上一页下一页切换回调 */
|
|
25
|
+
onChange?: (data: AnyObjectType, pageObj?: AnyObjectType) => void;
|
|
26
|
+
/** 关闭弹窗回调 */
|
|
27
|
+
onCancel?: (pageObj?: AnyObjectType) => void;
|
|
28
|
+
}
|
|
29
|
+
/** 批量编辑,用来编辑表格列表数据 */
|
|
30
|
+
declare const QuicklyProcessForms: (props: QuicklyProcessTypes) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default QuicklyProcessForms;
|
package/lib/TreeNode/index.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TreeProps } from 'antd/es/tree';
|
|
3
|
-
import { AnyObjectType } from '../brother/typings';
|
|
4
|
-
import './index.less';
|
|
5
|
-
export interface TreeNodeCallType {
|
|
6
|
-
setLoading: (data: boolean) => void;
|
|
7
|
-
getSelectNode: () =>
|
|
8
|
-
getSelectCurrent: () => TreeType[];
|
|
9
|
-
getCheckedNode: () => string[];
|
|
10
|
-
getCheckedCurrent: () => TreeType[];
|
|
11
|
-
setSelectNode: (data:
|
|
12
|
-
setCheckedNode: (data: string[]) => void;
|
|
13
|
-
}
|
|
14
|
-
export interface PropTypes {
|
|
15
|
-
/** 树结构数据 */
|
|
16
|
-
data?: TreeType[];
|
|
17
|
-
/** 是否打开搜索功能 */
|
|
18
|
-
searchOpen?: boolean;
|
|
19
|
-
/** 是否打开拖拽节点功能 */
|
|
20
|
-
draggableOpen?: boolean;
|
|
21
|
-
/** 是否打开右侧额外操作按钮功能 */
|
|
22
|
-
processOpen?: boolean;
|
|
23
|
-
/** 自定义每项右侧操作按钮 */
|
|
24
|
-
customAction?: (item: TreeType) => React.ReactNode;
|
|
25
|
-
/** 是否打开复选框功能 */
|
|
26
|
-
checkedOpen?: boolean;
|
|
27
|
-
/** 选中节点触发回调 */
|
|
28
|
-
onSelect?: (data: React.Key[], e: AnyObjectType) => void;
|
|
29
|
-
/** 拖拽完成回调 */
|
|
30
|
-
onDropCallBack?: (info: AnyObjectType, data: TreeType[]) => void;
|
|
31
|
-
/** 验证是否可以拖拽 */
|
|
32
|
-
onVerificationDropCallBack?: (info: AnyObjectType, data: TreeType[]) => boolean;
|
|
33
|
-
/** 支持antd tree组件全部传参 */
|
|
34
|
-
treeConfig?: TreeProps;
|
|
35
|
-
}
|
|
36
|
-
export interface TreeType {
|
|
37
|
-
id?: string;
|
|
38
|
-
title: string | JSX.Element;
|
|
39
|
-
key: string;
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
processOpen?: boolean;
|
|
42
|
-
noDrag?: boolean;
|
|
43
|
-
status?: 0 | 1 | 2;
|
|
44
|
-
children?: TreeType[];
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
47
|
-
declare const _default: React.ForwardRefExoticComponent<PropTypes & React.RefAttributes<unknown>>;
|
|
48
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TreeProps } from 'antd/es/tree';
|
|
3
|
+
import { AnyObjectType } from '../brother/typings';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export interface TreeNodeCallType {
|
|
6
|
+
setLoading: (data: boolean) => void;
|
|
7
|
+
getSelectNode: () => string[];
|
|
8
|
+
getSelectCurrent: () => TreeType[];
|
|
9
|
+
getCheckedNode: () => string[];
|
|
10
|
+
getCheckedCurrent: () => TreeType[];
|
|
11
|
+
setSelectNode: (data: string[]) => void;
|
|
12
|
+
setCheckedNode: (data: string[]) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface PropTypes {
|
|
15
|
+
/** 树结构数据 */
|
|
16
|
+
data?: TreeType[];
|
|
17
|
+
/** 是否打开搜索功能 */
|
|
18
|
+
searchOpen?: boolean;
|
|
19
|
+
/** 是否打开拖拽节点功能 */
|
|
20
|
+
draggableOpen?: boolean;
|
|
21
|
+
/** 是否打开右侧额外操作按钮功能 */
|
|
22
|
+
processOpen?: boolean;
|
|
23
|
+
/** 自定义每项右侧操作按钮 */
|
|
24
|
+
customAction?: (item: TreeType) => React.ReactNode;
|
|
25
|
+
/** 是否打开复选框功能 */
|
|
26
|
+
checkedOpen?: boolean;
|
|
27
|
+
/** 选中节点触发回调 */
|
|
28
|
+
onSelect?: (data: React.Key[], e: AnyObjectType) => void;
|
|
29
|
+
/** 拖拽完成回调 */
|
|
30
|
+
onDropCallBack?: (info: AnyObjectType, data: TreeType[]) => void;
|
|
31
|
+
/** 验证是否可以拖拽 */
|
|
32
|
+
onVerificationDropCallBack?: (info: AnyObjectType, data: TreeType[]) => boolean;
|
|
33
|
+
/** 支持antd tree组件全部传参 */
|
|
34
|
+
treeConfig?: TreeProps;
|
|
35
|
+
}
|
|
36
|
+
export interface TreeType {
|
|
37
|
+
id?: string;
|
|
38
|
+
title: string | JSX.Element;
|
|
39
|
+
key: string;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
processOpen?: boolean;
|
|
42
|
+
noDrag?: boolean;
|
|
43
|
+
status?: 0 | 1 | 2;
|
|
44
|
+
children?: TreeType[];
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}
|
|
47
|
+
declare const _default: React.ForwardRefExoticComponent<PropTypes & React.RefAttributes<unknown>>;
|
|
48
|
+
export default _default;
|
package/lib/Upload/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UploadProps } from 'antd/es/upload';
|
|
3
|
-
import { UploadFile } from 'antd/es/upload/interface';
|
|
4
|
-
import { AnyObjectType } from '../brother/typings';
|
|
5
|
-
import './index.less';
|
|
6
|
-
export interface UploadCallType {
|
|
7
|
-
/** 设置文件列表 */
|
|
8
|
-
setFileList: (data: UploadProps['fileList']) => void;
|
|
9
|
-
}
|
|
10
|
-
export type PropsType = {
|
|
11
|
-
/** 选择文件按钮 */
|
|
12
|
-
children: JSX.Element;
|
|
13
|
-
/** 设置上传的请求头部 */
|
|
14
|
-
headers?: AnyObjectType;
|
|
15
|
-
/** 上传成功回调 */
|
|
16
|
-
uploadSuccess?: (data: UploadFile<any>[]) => void;
|
|
17
|
-
} & UploadProps;
|
|
18
|
-
declare const _default: React.ForwardRefExoticComponent<{
|
|
19
|
-
/** 选择文件按钮 */
|
|
20
|
-
children: JSX.Element;
|
|
21
|
-
/** 设置上传的请求头部 */
|
|
22
|
-
headers?: AnyObjectType
|
|
23
|
-
/** 上传成功回调 */
|
|
24
|
-
uploadSuccess?: (
|
|
25
|
-
} & UploadProps<any> & React.RefAttributes<unknown>>;
|
|
26
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UploadProps } from 'antd/es/upload';
|
|
3
|
+
import { UploadFile } from 'antd/es/upload/interface';
|
|
4
|
+
import { AnyObjectType } from '../brother/typings';
|
|
5
|
+
import './index.less';
|
|
6
|
+
export interface UploadCallType {
|
|
7
|
+
/** 设置文件列表 */
|
|
8
|
+
setFileList: (data: UploadProps['fileList']) => void;
|
|
9
|
+
}
|
|
10
|
+
export type PropsType = {
|
|
11
|
+
/** 选择文件按钮 */
|
|
12
|
+
children: JSX.Element;
|
|
13
|
+
/** 设置上传的请求头部 */
|
|
14
|
+
headers?: AnyObjectType;
|
|
15
|
+
/** 上传成功回调 */
|
|
16
|
+
uploadSuccess?: (data: UploadFile<any>[]) => void;
|
|
17
|
+
} & UploadProps;
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<{
|
|
19
|
+
/** 选择文件按钮 */
|
|
20
|
+
children: JSX.Element;
|
|
21
|
+
/** 设置上传的请求头部 */
|
|
22
|
+
headers?: AnyObjectType;
|
|
23
|
+
/** 上传成功回调 */
|
|
24
|
+
uploadSuccess?: (data: UploadFile<any>[]) => void;
|
|
25
|
+
} & UploadProps<any> & React.RefAttributes<unknown>>;
|
|
26
|
+
export default _default;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { TableProps } from 'antd/es/table';
|
|
2
|
-
export type VirtualListProp<RecordType extends object = any> = {
|
|
3
|
-
/** 虚拟列表参数 */
|
|
4
|
-
vl: {
|
|
5
|
-
/** (必填) 对应scrollY */
|
|
6
|
-
height: number | string;
|
|
7
|
-
/** (可选) 滚动条滚到底部触发api */
|
|
8
|
-
onReachEnd?: () => void;
|
|
9
|
-
/** (可选) 滚动时触发的api */
|
|
10
|
-
onScroll?: () => void;
|
|
11
|
-
onListRender?: (listInfo: {
|
|
12
|
-
start: number;
|
|
13
|
-
renderLen: number;
|
|
14
|
-
}) => void;
|
|
15
|
-
debounceListRenderMS?: number;
|
|
16
|
-
/** (可选, 如果同一页面存在多个虚拟表格时必填.) 唯一标识 */
|
|
17
|
-
vid?: string;
|
|
18
|
-
/** 默认为true. 是否数据变更后重置滚动条 */
|
|
19
|
-
resetTopWhenDataChange?: boolean;
|
|
20
|
-
};
|
|
21
|
-
} & TableProps<RecordType>;
|
|
22
|
-
/** 虚拟列表 */
|
|
23
|
-
declare const VirtualList: (props: VirtualListProp) => JSX.Element;
|
|
24
|
-
export default VirtualList;
|
|
1
|
+
import { TableProps } from 'antd/es/table';
|
|
2
|
+
export type VirtualListProp<RecordType extends object = any> = {
|
|
3
|
+
/** 虚拟列表参数 */
|
|
4
|
+
vl: {
|
|
5
|
+
/** (必填) 对应scrollY */
|
|
6
|
+
height: number | string;
|
|
7
|
+
/** (可选) 滚动条滚到底部触发api */
|
|
8
|
+
onReachEnd?: () => void;
|
|
9
|
+
/** (可选) 滚动时触发的api */
|
|
10
|
+
onScroll?: () => void;
|
|
11
|
+
onListRender?: (listInfo: {
|
|
12
|
+
start: number;
|
|
13
|
+
renderLen: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
debounceListRenderMS?: number;
|
|
16
|
+
/** (可选, 如果同一页面存在多个虚拟表格时必填.) 唯一标识 */
|
|
17
|
+
vid?: string;
|
|
18
|
+
/** 默认为true. 是否数据变更后重置滚动条 */
|
|
19
|
+
resetTopWhenDataChange?: boolean;
|
|
20
|
+
};
|
|
21
|
+
} & TableProps<RecordType>;
|
|
22
|
+
/** 虚拟列表 */
|
|
23
|
+
declare const VirtualList: (props: VirtualListProp) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default VirtualList;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
interface PropTypes {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const Config: (props: PropTypes) => JSX.Element;
|
|
8
|
-
export default Config;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'dayjs/locale/zh-cn';
|
|
3
|
+
import 'dayjs/locale/zh-hk';
|
|
4
|
+
interface PropTypes {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const Config: (props: PropTypes) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Config;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** 使用react-dnd外层嵌套 */
|
|
3
|
-
declare const DndContainer: React.FC
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** 使用react-dnd外层嵌套 */
|
|
3
|
+
declare const DndContainer: React.FC<{
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default DndContainer;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export default _default;
|
|
1
|
+
import useDeepCompareEffect from './useDeepCompareEffect';
|
|
2
|
+
import useMethods from './useMethods';
|
|
3
|
+
import useToggle from './useToggle';
|
|
4
|
+
import useLatest from './useLatest';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
|
|
7
|
+
useDeepCompareEffect: typeof useDeepCompareEffect;
|
|
8
|
+
useUpdateEffect: typeof import("react").useEffect | typeof import("react").useLayoutEffect;
|
|
9
|
+
useMemoizedFn: typeof import("react").useEffect | typeof import("react").useLayoutEffect;
|
|
10
|
+
useMount: (fn: () => void) => void;
|
|
11
|
+
useUnmount: (fn: () => void) => void;
|
|
12
|
+
useMethods: typeof useMethods;
|
|
13
|
+
useToggle: typeof useToggle;
|
|
14
|
+
useLatest: typeof useLatest;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type UseEffectParams = Parameters<typeof React.useEffect>;
|
|
3
|
-
type EffectCallback = UseEffectParams[0];
|
|
4
|
-
type DependencyList = UseEffectParams[1];
|
|
5
|
-
type UseEffectReturn = ReturnType<typeof React.useEffect>;
|
|
6
|
-
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): UseEffectReturn;
|
|
7
|
-
export default useDeepCompareEffect;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type UseEffectParams = Parameters<typeof React.useEffect>;
|
|
3
|
+
type EffectCallback = UseEffectParams[0];
|
|
4
|
+
type DependencyList = UseEffectParams[1];
|
|
5
|
+
type UseEffectReturn = ReturnType<typeof React.useEffect>;
|
|
6
|
+
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): UseEffectReturn;
|
|
7
|
+
export default useDeepCompareEffect;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default useLatest;
|
|
1
|
+
declare function useLatest<T>(value: T): import("react").MutableRefObject<T>;
|
|
2
|
+
export default useLatest;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type noop = (...args: any[]) => any;
|
|
2
|
-
declare function useMemoizedFn<T extends noop>(fn: T): T;
|
|
3
|
-
export default useMemoizedFn;
|
|
1
|
+
type noop = (...args: any[]) => any;
|
|
2
|
+
declare function useMemoizedFn<T extends noop>(fn: T): T;
|
|
3
|
+
export default useMemoizedFn;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function useMethods<T extends Record<string, (...args: any[]) => any>>(methods: T): T;
|
|
2
|
-
export default useMethods;
|
|
1
|
+
declare function useMethods<T extends Record<string, (...args: any[]) => any>>(methods: T): T;
|
|
2
|
+
export default useMethods;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useMount: (fn: () => void) => void;
|
|
2
|
-
export default useMount;
|
|
1
|
+
declare const useMount: (fn: () => void) => void;
|
|
2
|
+
export default useMount;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
|
|
2
|
-
export default useSetState;
|
|
1
|
+
declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
|
|
2
|
+
export default useSetState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface Actions<T> {
|
|
2
|
-
setLeft: () => void;
|
|
3
|
-
setRight: () => void;
|
|
4
|
-
set: (value: T) => void;
|
|
5
|
-
toggle: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare function useToggle<T = boolean>(): [boolean, Actions<T>];
|
|
8
|
-
declare function useToggle<T>(defaultValue: T): [T, Actions<T>];
|
|
9
|
-
declare function useToggle<T, U>(defaultValue: T, reverseValue: U): [T | U, Actions<T | U>];
|
|
10
|
-
export default useToggle;
|
|
1
|
+
export interface Actions<T> {
|
|
2
|
+
setLeft: () => void;
|
|
3
|
+
setRight: () => void;
|
|
4
|
+
set: (value: T) => void;
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare function useToggle<T = boolean>(): [boolean, Actions<T>];
|
|
8
|
+
declare function useToggle<T>(defaultValue: T): [T, Actions<T>];
|
|
9
|
+
declare function useToggle<T, U>(defaultValue: T, reverseValue: U): [T | U, Actions<T | U>];
|
|
10
|
+
export default useToggle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useUnmount: (fn: () => void) => void;
|
|
2
|
-
export default useUnmount;
|
|
1
|
+
declare const useUnmount: (fn: () => void) => void;
|
|
2
|
+
export default useUnmount;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useLayoutEffect } from 'react';
|
|
2
|
-
type effectHookType = typeof useEffect | typeof useLayoutEffect;
|
|
3
|
-
declare const _default: effectHookType;
|
|
4
|
-
export default _default;
|
|
1
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
2
|
+
type effectHookType = typeof useEffect | typeof useLayoutEffect;
|
|
3
|
+
declare const _default: effectHookType;
|
|
4
|
+
export default _default;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
4
|
-
export type AnyObjectType = {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
export type PromiseAxiosResultType = Promise<AjaxResultType>;
|
|
8
|
-
export type SubmitApiType = (data: AnyObjectType, method: AxiosRequestConfig['method']) => Promise<AjaxResultType<AnyObjectType>>;
|
|
9
|
-
export type RequestPageType = {
|
|
10
|
-
page: number;
|
|
11
|
-
size: number;
|
|
12
|
-
} | AnyObjectType | undefined;
|
|
13
|
-
export type ResultPageType<T = any[]> = {
|
|
14
|
-
content: T;
|
|
15
|
-
page: string;
|
|
16
|
-
pageShowFlag: boolean;
|
|
17
|
-
pages: string;
|
|
18
|
-
total: string;
|
|
19
|
-
sort: any[];
|
|
20
|
-
size: string;
|
|
21
|
-
};
|
|
22
|
-
export interface SelectType {
|
|
23
|
-
label: string | React.ReactNode;
|
|
24
|
-
value: string | number;
|
|
25
|
-
children?: SelectType[];
|
|
26
|
-
}
|
|
27
|
-
export interface AjaxResultType<T = any> {
|
|
28
|
-
code: number;
|
|
29
|
-
data: T;
|
|
30
|
-
msg: string;
|
|
31
|
-
total?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface SetRowStateType {
|
|
34
|
-
ids: string[];
|
|
35
|
-
type: 'pending' | 'recover';
|
|
36
|
-
}
|
|
37
|
-
export type SetStateType<T = AnyObjectType> = (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void;
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
4
|
+
export type AnyObjectType = {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
export type PromiseAxiosResultType = Promise<AjaxResultType>;
|
|
8
|
+
export type SubmitApiType = (data: AnyObjectType, method: AxiosRequestConfig['method']) => Promise<AjaxResultType<AnyObjectType>>;
|
|
9
|
+
export type RequestPageType = {
|
|
10
|
+
page: number;
|
|
11
|
+
size: number;
|
|
12
|
+
} | AnyObjectType | undefined;
|
|
13
|
+
export type ResultPageType<T = any[]> = {
|
|
14
|
+
content: T;
|
|
15
|
+
page: string;
|
|
16
|
+
pageShowFlag: boolean;
|
|
17
|
+
pages: string;
|
|
18
|
+
total: string;
|
|
19
|
+
sort: any[];
|
|
20
|
+
size: string;
|
|
21
|
+
};
|
|
22
|
+
export interface SelectType {
|
|
23
|
+
label: string | React.ReactNode;
|
|
24
|
+
value: string | number;
|
|
25
|
+
children?: SelectType[];
|
|
26
|
+
}
|
|
27
|
+
export interface AjaxResultType<T = any> {
|
|
28
|
+
code: number;
|
|
29
|
+
data: T;
|
|
30
|
+
msg: string;
|
|
31
|
+
total?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface SetRowStateType {
|
|
34
|
+
ids: string[];
|
|
35
|
+
type: 'pending' | 'recover';
|
|
36
|
+
}
|
|
37
|
+
export type SetStateType<T = AnyObjectType> = (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void;
|
|
@@ -1,54 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @
|
|
6
|
-
* @
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
15
|
-
* @param {any}
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* @
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @
|
|
36
|
-
* @
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* @
|
|
51
|
-
* @
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export declare const dropDownMenuPushAll: (data: FormListType[] | undefined) => FormListType[];
|
|
1
|
+
import { FormListType } from '../../GenerateForm';
|
|
2
|
+
import { SelectType, AnyObjectType } from '../../brother/typings';
|
|
3
|
+
/**
|
|
4
|
+
* @description 获取localStorage
|
|
5
|
+
* @author bihongbin
|
|
6
|
+
* @param {any} key
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Date 2023-07-12 10:37:20
|
|
9
|
+
*/
|
|
10
|
+
export declare const getStorage: (key: any) => any;
|
|
11
|
+
/**
|
|
12
|
+
* @description 设置localStorage
|
|
13
|
+
* @author bihongbin
|
|
14
|
+
* @param {any} key
|
|
15
|
+
* @param {any} value
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Date 2023-07-12 10:37:33
|
|
18
|
+
*/
|
|
19
|
+
export declare const setStorage: (key: any, value: any) => null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* @description 比较2个对象是否相等
|
|
22
|
+
* @Author bihongbin
|
|
23
|
+
* @return {*}
|
|
24
|
+
* @Date 2023-07-07 14:11:02
|
|
25
|
+
*/
|
|
26
|
+
export declare const isEqualWithFunc: (o1: AnyObjectType, o2: AnyObjectType) => boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @Description 组件是否重新渲染比较
|
|
29
|
+
* @Author bihongbin
|
|
30
|
+
* @Date 2021-08-26 14:10:48
|
|
31
|
+
*/
|
|
32
|
+
export declare const isEqualWith: (prevProps: any, nextProps: any) => boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @Description 检查数据类型是否符合
|
|
35
|
+
* @Author bihongbin
|
|
36
|
+
* @Date 2021-011-09 11:26:15
|
|
37
|
+
*/
|
|
38
|
+
export declare const typeofEqual: (data: {
|
|
39
|
+
data: any;
|
|
40
|
+
type: "Object" | "Array" | "String" | "Number";
|
|
41
|
+
}) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @Description 获取下拉菜单的对应值
|
|
44
|
+
* @Author bihongbin
|
|
45
|
+
* @Date 2021-11-11 15:00:30
|
|
46
|
+
*/
|
|
47
|
+
export declare const getSelectValue: (list: SelectType[], value: string | number) => import("react").ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* @Description 默认下拉菜单增加全部这一选项
|
|
50
|
+
* @Author bihongbin
|
|
51
|
+
* @Date 2020-11-06 13:57:22
|
|
52
|
+
*/
|
|
53
|
+
export declare const dropDownMenuPushAll: (data: FormListType[] | undefined) => FormListType[];
|