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.
Files changed (37) hide show
  1. package/lib/Affix/index.d.ts +7 -7
  2. package/lib/ButtonGroup/index.d.ts +29 -29
  3. package/lib/Dialog/index.d.ts +24 -24
  4. package/lib/Empty/index.d.ts +11 -9
  5. package/lib/GaoDeMap/index.d.ts +23 -23
  6. package/lib/GenerateForm/index.d.ts +141 -143
  7. package/lib/GenerateTable/EditableCell/index.d.ts +74 -75
  8. package/lib/GenerateTable/ResizableTitle/index.d.ts +3 -2
  9. package/lib/GenerateTable/index.d.ts +115 -115
  10. package/lib/IconSelectionModal/index.d.ts +16 -16
  11. package/lib/LayoutFormModal/index.d.ts +74 -73
  12. package/lib/LayoutTableModal/index.d.ts +95 -95
  13. package/lib/QuicklyProcessForms/index.d.ts +31 -31
  14. package/lib/TreeNode/index.d.ts +48 -48
  15. package/lib/Upload/index.d.ts +26 -26
  16. package/lib/VirtualList/index.d.ts +24 -24
  17. package/lib/brother/ConfigProvider/index.d.ts +8 -8
  18. package/lib/brother/DndWrap/index.d.ts +6 -4
  19. package/lib/brother/hooks/index.d.ts +16 -17
  20. package/lib/brother/hooks/useDeepCompareEffect/index.d.ts +7 -7
  21. package/lib/brother/hooks/useLatest/index.d.ts +2 -3
  22. package/lib/brother/hooks/useMemoizedFn/index.d.ts +3 -3
  23. package/lib/brother/hooks/useMethods/index.d.ts +2 -2
  24. package/lib/brother/hooks/useMount/index.d.ts +2 -2
  25. package/lib/brother/hooks/useSetState/index.d.ts +2 -2
  26. package/lib/brother/hooks/useToggle/index.d.ts +10 -10
  27. package/lib/brother/hooks/useUnmount/index.d.ts +2 -2
  28. package/lib/brother/hooks/useUpdateEffect/index.d.ts +4 -4
  29. package/lib/brother/typings/index.d.ts +37 -37
  30. package/lib/brother/utils/index.d.ts +53 -54
  31. package/lib/index.cjs.js +25 -0
  32. package/lib/index.cjs.js.map +1 -0
  33. package/lib/index.d.ts +16 -16
  34. package/lib/index.esm.js +25 -0
  35. package/lib/index.esm.js.map +1 -0
  36. package/package.json +29 -37
  37. package/lib/index.js +0 -23
@@ -1,115 +1,115 @@
1
- import React from 'react';
2
- import { TablePaginationConfig, TableProps, ColumnType } from 'antd/es/table';
3
- import { EditableColumnsType } from './EditableCell';
4
- import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
5
- import './index.less';
6
- export type TableColumns<T = AnyObjectType> = ColumnType<T> & Partial<EditableColumnsType>;
7
- export interface getTableListQueryType {
8
- /** 分页值 */
9
- current?: number;
10
- /** 是否清空选中项(ids和rows) */
11
- clearSelectIds?: boolean;
12
- /** 传此参数不重置分页 */
13
- pagination?: 'not-reset';
14
- [key: string]: any;
15
- }
16
- export interface TableCallType {
17
- setTableLoading: (data: boolean) => void;
18
- /** 调用接口手动加载数据 */
19
- getTableList: (values?: getTableListQueryType, callBack?: () => void) => void;
20
- /** 获取分页数据 */
21
- getPages: () => TablePaginationType | undefined;
22
- /** 设置选中id,当设置original=true时,不会重置selectRowIds,会在原有的selectRowIds扩展 */
23
- setRowSelected: (selectedRowKeys: any[], original?: true) => void;
24
- /** 设置选中列数据[{}] */
25
- setRowSelectedBy: (data: AnyObjectType[]) => void;
26
- /** 获取选中id */
27
- getSelectIds: () => any[];
28
- /** 清空选中 */
29
- clearSelectIds: () => void;
30
- /** 获取选中的数据项 */
31
- getSelectRowsArray: () => AnyObjectType[];
32
- /** 删除选中id */
33
- removeSelectIds: (data: string[]) => void;
34
- /** 获取表格静态数据 */
35
- getStaticDataList: () => AnyObjectType[];
36
- /** 设置表格静态数据 */
37
- setStaticDataList: (row: AnyObjectType | AnyObjectType[], callback?: () => void) => void;
38
- }
39
- export type ScrollXYType = {
40
- x?: string | number | true | undefined;
41
- y?: string | number | undefined;
42
- };
43
- export interface VirtualProps {
44
- /** 虚拟滚动高度,该高度必须和table.scroll.y值一样,否则会出现滚动条不显示的问题 */
45
- height: number | string;
46
- onReachEnd?: () => void;
47
- onScroll?: () => void;
48
- onListRender?: (listInfo: {
49
- start: number;
50
- renderLen: number;
51
- }) => void;
52
- debounceListRenderMS?: number;
53
- vid?: string;
54
- resetTopWhenDataChange?: boolean;
55
- }
56
- export interface GenerateTableProp {
57
- extra: {
58
- /** 支持antd Table组件官方传参所有类型 */
59
- tableConfig?: TableProps<any>;
60
- /** 是否开启表格行选中 checkbox多选 radio单选 */
61
- rowType?: 'checkbox' | 'radio' | undefined;
62
- /** 开启固定列参数 */
63
- scroll?: ScrollXYType;
64
- /** 列表请求函数 */
65
- apiMethod?: (data: any) => PromiseAxiosResultType;
66
- /** 表格头 */
67
- columns: TableColumns<AnyObjectType>[];
68
- /** 静态表格数据 */
69
- data?: AnyObjectType[];
70
- /** 表格数据编辑是否是受控组件(该参数已丢弃) */
71
- controlled?: boolean;
72
- /** 列拖动功能 */
73
- drag?: {
74
- /** 打开与关闭 */
75
- open: boolean;
76
- /** 拖动回调 */
77
- moveRow: (
78
- /** 目标终点位置 */
79
- dragIndex: number,
80
- /** 目标开始位置 */
81
- hoverIndex: number,
82
- /** 拖拽完成后数据 */
83
- data: AnyObjectType[],
84
- /** 原数据 */
85
- prevData: AnyObjectType[],
86
- /** 拖拽范围数据 */
87
- range: AnyObjectType[]) => Promise<boolean> | void;
88
- };
89
- /** 虚拟滚动功能 */
90
- virtual?: {
91
- /** 打开与关闭 */
92
- open: boolean;
93
- /** 虚拟滚动配置 */
94
- config: VirtualProps;
95
- };
96
- /**隐藏排序列 */
97
- hidSortColumn?: boolean;
98
- /** 行选中回调 */
99
- onSelect?: (selectedRows: AnyObjectType[], selectedRowKeys: any[]) => void;
100
- /** 控制分页格式 */
101
- paginationConfig?: false | TablePaginationConfig;
102
- /** 选择框的默认属性配置 */
103
- getCheckboxProps?: (record: AnyObjectType) => AnyObjectType;
104
- /** 数据结果过滤 */
105
- resultFilter?: (data: any) => Promise<AnyObjectType[]> | AnyObjectType[];
106
- /** 数据调用成功回调 */
107
- getTableSuccessData?: (data: AnyObjectType) => void;
108
- };
109
- }
110
- type TablePaginationType = TablePaginationConfig & {
111
- pages: number;
112
- [key: string]: any;
113
- };
114
- declare const _default: React.ForwardRefExoticComponent<GenerateTableProp & React.RefAttributes<unknown>>;
115
- export default _default;
1
+ import React from 'react';
2
+ import { TablePaginationConfig, TableProps, ColumnType } from 'antd/es/table';
3
+ import { EditableColumnsType } from './EditableCell';
4
+ import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
5
+ import './index.less';
6
+ export type TableColumns<T = AnyObjectType> = ColumnType<T> & Partial<EditableColumnsType>;
7
+ export interface getTableListQueryType {
8
+ /** 分页值 */
9
+ current?: number;
10
+ /** 是否清空选中项(ids和rows) */
11
+ clearSelectIds?: boolean;
12
+ /** 传此参数不重置分页 */
13
+ pagination?: 'not-reset';
14
+ [key: string]: any;
15
+ }
16
+ export interface TableCallType {
17
+ setTableLoading: (data: boolean) => void;
18
+ /** 调用接口手动加载数据 */
19
+ getTableList: (values?: getTableListQueryType, callBack?: () => void) => void;
20
+ /** 获取分页数据 */
21
+ getPages: () => TablePaginationType | undefined;
22
+ /** 设置选中id,当设置original=true时,不会重置selectRowIds,会在原有的selectRowIds扩展 */
23
+ setRowSelected: (selectedRowKeys: any[], original?: true) => void;
24
+ /** 设置选中列数据[{}] */
25
+ setRowSelectedBy: (data: AnyObjectType[]) => void;
26
+ /** 获取选中id */
27
+ getSelectIds: () => any[];
28
+ /** 清空选中 */
29
+ clearSelectIds: () => void;
30
+ /** 获取选中的数据项 */
31
+ getSelectRowsArray: () => AnyObjectType[];
32
+ /** 删除选中id */
33
+ removeSelectIds: (data: string[]) => void;
34
+ /** 获取表格静态数据 */
35
+ getStaticDataList: () => AnyObjectType[];
36
+ /** 设置表格静态数据 */
37
+ setStaticDataList: (row: AnyObjectType | AnyObjectType[], callback?: () => void) => void;
38
+ }
39
+ export type ScrollXYType = {
40
+ x?: string | number | true | undefined;
41
+ y?: string | number | undefined;
42
+ };
43
+ export interface VirtualProps {
44
+ /** 虚拟滚动高度,该高度必须和table.scroll.y值一样,否则会出现滚动条不显示的问题 */
45
+ height: number | string;
46
+ onReachEnd?: () => void;
47
+ onScroll?: () => void;
48
+ onListRender?: (listInfo: {
49
+ start: number;
50
+ renderLen: number;
51
+ }) => void;
52
+ debounceListRenderMS?: number;
53
+ vid?: string;
54
+ resetTopWhenDataChange?: boolean;
55
+ }
56
+ export interface GenerateTableProp {
57
+ extra: {
58
+ /** 支持antd Table组件官方传参所有类型 */
59
+ tableConfig?: TableProps<any>;
60
+ /** 是否开启表格行选中 checkbox多选 radio单选 */
61
+ rowType?: 'checkbox' | 'radio' | undefined;
62
+ /** 开启固定列参数 */
63
+ scroll?: ScrollXYType;
64
+ /** 列表请求函数 */
65
+ apiMethod?: (data: any) => PromiseAxiosResultType;
66
+ /** 表格头 */
67
+ columns: TableColumns<AnyObjectType>[];
68
+ /** 静态表格数据 */
69
+ data?: AnyObjectType[];
70
+ /** 表格数据编辑是否是受控组件(该参数已丢弃) */
71
+ controlled?: boolean;
72
+ /** 列拖动功能 */
73
+ drag?: {
74
+ /** 打开与关闭 */
75
+ open: boolean;
76
+ /** 拖动回调 */
77
+ moveRow: (
78
+ /** 目标终点位置 */
79
+ dragIndex: number,
80
+ /** 目标开始位置 */
81
+ hoverIndex: number,
82
+ /** 拖拽完成后数据 */
83
+ data: AnyObjectType[],
84
+ /** 原数据 */
85
+ prevData: AnyObjectType[],
86
+ /** 拖拽范围数据 */
87
+ range: AnyObjectType[]) => Promise<boolean> | void;
88
+ };
89
+ /** 虚拟滚动功能 */
90
+ virtual?: {
91
+ /** 打开与关闭 */
92
+ open: boolean;
93
+ /** 虚拟滚动配置 */
94
+ config: VirtualProps;
95
+ };
96
+ /**隐藏排序列 */
97
+ hidSortColumn?: boolean;
98
+ /** 行选中回调 */
99
+ onSelect?: (selectedRows: AnyObjectType[], selectedRowKeys: any[]) => void;
100
+ /** 控制分页格式 */
101
+ paginationConfig?: false | TablePaginationConfig;
102
+ /** 选择框的默认属性配置 */
103
+ getCheckboxProps?: (record: AnyObjectType) => AnyObjectType;
104
+ /** 数据结果过滤 */
105
+ resultFilter?: (data: any) => Promise<AnyObjectType[]> | AnyObjectType[];
106
+ /** 数据调用成功回调 */
107
+ getTableSuccessData?: (data: AnyObjectType) => void;
108
+ };
109
+ }
110
+ type TablePaginationType = TablePaginationConfig & {
111
+ pages: number;
112
+ [key: string]: any;
113
+ };
114
+ declare const _default: React.ForwardRefExoticComponent<GenerateTableProp & React.RefAttributes<unknown>>;
115
+ export default _default;
@@ -1,16 +1,16 @@
1
- import './index.less';
2
- interface Props {
3
- /** 打开关闭 */
4
- visible: boolean;
5
- /** 弹窗宽度 */
6
- width?: number;
7
- /** 弹窗标题 */
8
- title?: string;
9
- /** 取消回调 */
10
- onCancel: () => void;
11
- /** 选择图标回调 */
12
- onConfirm?: (item: string) => void;
13
- }
14
- /** 选择图标弹窗 */
15
- declare const IconSelectionModal: (props: Props) => JSX.Element;
16
- export default IconSelectionModal;
1
+ import './index.less';
2
+ interface Props {
3
+ /** 打开关闭 */
4
+ visible: boolean;
5
+ /** 弹窗宽度 */
6
+ width?: number;
7
+ /** 弹窗标题 */
8
+ title?: string;
9
+ /** 取消回调 */
10
+ onCancel: () => void;
11
+ /** 选择图标回调 */
12
+ onConfirm?: (item: string) => void;
13
+ }
14
+ /** 选择图标弹窗 */
15
+ declare const IconSelectionModal: (props: Props) => import("react/jsx-runtime").JSX.Element;
16
+ export default IconSelectionModal;
@@ -1,73 +1,74 @@
1
- import React from 'react';
2
- import { ButtonProps } from 'antd/es/button';
3
- import { FormInstance, NamePath } from 'rc-field-form/es/interface';
4
- import { FormProps } from 'antd/es/form';
5
- import { ColProps } from 'antd/es/col';
6
- import { FormListType } from '../GenerateForm';
7
- import { AnyObjectType, SubmitApiType } from '../brother/typings';
8
- import './index.less';
9
- export interface LayoutFormPropTypes {
10
- /** 类名 */
11
- className?: string;
12
- /** 打开或关闭 */
13
- visible: boolean;
14
- /** 表单是否禁用 */
15
- disable?: boolean;
16
- id?: string | null | undefined;
17
- /** 弹窗标题 */
18
- title: string | React.ReactNode | null | undefined;
19
- /** 弹窗宽度 */
20
- width?: number;
21
- /** 表单弹窗头部显示的额外dom元素 */
22
- topRender?: React.ReactElement;
23
- /** 组件子元素插槽 */
24
- children?: React.ReactNode;
25
- /** 底部操作按钮自定义HTML */
26
- footer?: React.ReactNode;
27
- /** 底部操作按钮自定义Array */
28
- footBtnList?: {
29
- model: 'new' | 'before' | 'after';
30
- data: ButtonProps[];
31
- };
32
- /** 手动参数转换 */
33
- manualParameterChange?: (params: AnyObjectType) => AnyObjectType;
34
- /** 手动验证表单 */
35
- manualVerification?: (params: AnyObjectType) => boolean;
36
- /** 提交表单需要移除的参数 */
37
- submitRemoveField?: string[];
38
- /** 需要提交表单的额外参数 */
39
- submitExtraParameters?: AnyObjectType;
40
- /** 开关组件值转换成0和1 */
41
- switchTransform?: string[];
42
- /** 提交表单的接口 */
43
- submitApi?: SubmitApiType;
44
- /** 关闭弹窗回调 */
45
- onCancel?: () => void;
46
- /** 确定或保存回调,返回false会阻止关闭 */
47
- onConfirm?: (data: AnyObjectType) => void | boolean | Promise<void | boolean>;
48
- /** 表单数据 */
49
- formList: FormListType[];
50
- /** 表单每行显示的数量 */
51
- colGirdConfig?: ColProps;
52
- /** 支持antd Form组件官方传参所有类型 */
53
- formConfig?: FormProps;
54
- }
55
- export interface LayoutFormModalCallType {
56
- /** 设置loading */
57
- setFormLoading: (data: boolean) => void;
58
- /** 设置保存loading */
59
- setFormSaveLoading: (data: boolean) => void;
60
- /** 设置一组字段状态 */
61
- setFormFields: FormInstance['setFields'];
62
- /** 读取表单值 */
63
- getFormValues: (data: string[]) => AnyObjectType | undefined;
64
- /** 设置表单值 */
65
- setFormValues: (values: AnyObjectType) => void;
66
- /** 排除指定表单后提交 */
67
- excludeFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
68
- /** 提交表单并验证 */
69
- getFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
70
- }
71
- export type LayoutFormModalListType = FormListType;
72
- declare const _default: React.ForwardRefExoticComponent<LayoutFormPropTypes & React.RefAttributes<unknown>>;
73
- export default _default;
1
+ import React from 'react';
2
+ import { ButtonProps } from 'antd/es/button';
3
+ import type { FormInstance } from 'antd/es/form';
4
+ type NamePath = any;
5
+ import { FormProps } from 'antd/es/form';
6
+ import { ColProps } from 'antd/es/col';
7
+ import { FormListType } from '../GenerateForm';
8
+ import { AnyObjectType, SubmitApiType } from '../brother/typings';
9
+ import './index.less';
10
+ export interface LayoutFormPropTypes {
11
+ /** 类名 */
12
+ className?: string;
13
+ /** 打开或关闭 */
14
+ visible: boolean;
15
+ /** 表单是否禁用 */
16
+ disable?: boolean;
17
+ id?: string | null | undefined;
18
+ /** 弹窗标题 */
19
+ title: string | React.ReactNode | null | undefined;
20
+ /** 弹窗宽度 */
21
+ width?: number;
22
+ /** 表单弹窗头部显示的额外dom元素 */
23
+ topRender?: React.ReactElement;
24
+ /** 组件子元素插槽 */
25
+ children?: React.ReactNode;
26
+ /** 底部操作按钮自定义HTML */
27
+ footer?: React.ReactNode;
28
+ /** 底部操作按钮自定义Array */
29
+ footBtnList?: {
30
+ model: 'new' | 'before' | 'after';
31
+ data: ButtonProps[];
32
+ };
33
+ /** 手动参数转换 */
34
+ manualParameterChange?: (params: AnyObjectType) => AnyObjectType;
35
+ /** 手动验证表单 */
36
+ manualVerification?: (params: AnyObjectType) => boolean;
37
+ /** 提交表单需要移除的参数 */
38
+ submitRemoveField?: string[];
39
+ /** 需要提交表单的额外参数 */
40
+ submitExtraParameters?: AnyObjectType;
41
+ /** 开关组件值转换成0和1 */
42
+ switchTransform?: string[];
43
+ /** 提交表单的接口 */
44
+ submitApi?: SubmitApiType;
45
+ /** 关闭弹窗回调 */
46
+ onCancel?: () => void;
47
+ /** 确定或保存回调,返回false会阻止关闭 */
48
+ onConfirm?: (data: AnyObjectType) => void | boolean | Promise<void | boolean>;
49
+ /** 表单数据 */
50
+ formList: FormListType[];
51
+ /** 表单每行显示的数量 */
52
+ colGirdConfig?: ColProps;
53
+ /** 支持antd Form组件官方传参所有类型 */
54
+ formConfig?: FormProps;
55
+ }
56
+ export interface LayoutFormModalCallType {
57
+ /** 设置loading */
58
+ setFormLoading: (data: boolean) => void;
59
+ /** 设置保存loading */
60
+ setFormSaveLoading: (data: boolean) => void;
61
+ /** 设置一组字段状态 */
62
+ setFormFields: FormInstance['setFields'];
63
+ /** 读取表单值 */
64
+ getFormValues: (data: string[]) => AnyObjectType | undefined;
65
+ /** 设置表单值 */
66
+ setFormValues: (values: AnyObjectType) => void;
67
+ /** 排除指定表单后提交 */
68
+ excludeFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
69
+ /** 提交表单并验证 */
70
+ getFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
71
+ }
72
+ export type LayoutFormModalListType = FormListType;
73
+ declare const _default: React.ForwardRefExoticComponent<LayoutFormPropTypes & React.RefAttributes<unknown>>;
74
+ export default _default;
@@ -1,95 +1,95 @@
1
- import React from 'react';
2
- import { RowProps } from 'antd/lib/row';
3
- import { ColProps } from 'antd/lib/col';
4
- import { ModalProps } from 'antd/lib/modal';
5
- import { TableProps } from 'antd/es/table';
6
- import { FormProps } from 'antd/es/form';
7
- import { FormListType, FormCallType } from '../GenerateForm';
8
- import { TableCallType, GenerateTableProp, TableColumns, getTableListQueryType } from '../GenerateTable';
9
- import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
10
- import './index.less';
11
- export type LayoutTableModalCallType = TableCallType & FormCallType & {
12
- setSavaLoading: (data: boolean) => void;
13
- };
14
- export interface SizeType {
15
- xs?: number;
16
- sm?: number;
17
- md?: number;
18
- lg?: number;
19
- xl?: number;
20
- xxl?: number;
21
- }
22
- export interface LayoutTableModalPropType {
23
- /** 打开或关闭 */
24
- visible: boolean;
25
- /** 弹窗标题 */
26
- title: React.ReactNode;
27
- /** 弹窗宽度 */
28
- width?: number;
29
- /** 自定义modal配置 */
30
- modalConfig?: ModalProps;
31
- /** 头部渲染额外元素 */
32
- topExtra?: React.ReactNode;
33
- /** 搜索表单数据 */
34
- searchFormList?: FormListType[];
35
- /** 表单方法 */
36
- formConfig?: FormProps;
37
- /** 查询时是否清除选中项 */
38
- clearSelectIds?: getTableListQueryType['clearSelectIds'];
39
- /** rowType=checkbox多选 radio单选 list=表格头 tableConfig=自定义配置,支持antd官方表格所有参数*/
40
- tableColumnsList: {
41
- /** checkbox多选 radio单选 */
42
- rowType?: 'checkbox' | 'radio' | undefined;
43
- /** 表格头 */
44
- list: TableColumns[];
45
- /** 自定义配置,支持antd官方表格所有参数 */
46
- tableConfig?: TableProps<any>;
47
- };
48
- /** 是否开启默认查询功能 */
49
- autoGetList?: boolean;
50
- /** 查询回调 */
51
- searchCallback?: (data: any) => Promise<Boolean>;
52
- /** 不需要重置的表单字段 */
53
- searchNoResetFiled?: string[];
54
- /** 列表请求函数 */
55
- apiMethod?: (data: any) => PromiseAxiosResultType;
56
- /** 查询表单手动参数转换 */
57
- manualParameterChange?: (params: AnyObjectType) => AnyObjectType;
58
- /** 静态表格数据 */
59
- data?: AnyObjectType[];
60
- /** 已选列表 */
61
- openSelected?: {
62
- /** 是否打开 */
63
- visible: boolean;
64
- /** 默认已选中 */
65
- defaultValues?: AnyObjectType[];
66
- /** 显示的字段名 */
67
- fileName?: string;
68
- /** 内容区域高度 */
69
- height?: number;
70
- };
71
- /** 排列方式布局Row */
72
- rowProps?: RowProps;
73
- /** 主内容Col */
74
- colProps?: ColProps;
75
- /** 左边插槽 */
76
- leftSlot?: {
77
- colProps: ColProps;
78
- jsx: React.ReactNode;
79
- };
80
- /** 右边插槽 */
81
- rightSlot?: {
82
- colProps: ColProps;
83
- jsx: React.ReactNode;
84
- };
85
- /** 数据调用成功回调 */
86
- getTableSuccessData?: (data: AnyObjectType) => void;
87
- /** 行选中回调 */
88
- onSelect?: GenerateTableProp['extra']['onSelect'];
89
- /** 关闭弹窗回调 */
90
- onCancel?: () => void;
91
- /** 确定弹窗回调 */
92
- onConfirm?: (rows: AnyObjectType[], ids: string[]) => Promise<boolean>;
93
- }
94
- declare const _default: React.ForwardRefExoticComponent<LayoutTableModalPropType & React.RefAttributes<unknown>>;
95
- export default _default;
1
+ import React from 'react';
2
+ import { RowProps } from 'antd/lib/row';
3
+ import { ColProps } from 'antd/lib/col';
4
+ import { ModalProps } from 'antd/lib/modal';
5
+ import { TableProps } from 'antd/es/table';
6
+ import { FormProps } from 'antd/es/form';
7
+ import { FormListType, FormCallType } from '../GenerateForm';
8
+ import { TableCallType, GenerateTableProp, TableColumns, getTableListQueryType } from '../GenerateTable';
9
+ import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
10
+ import './index.less';
11
+ export type LayoutTableModalCallType = TableCallType & FormCallType & {
12
+ setSavaLoading: (data: boolean) => void;
13
+ };
14
+ export interface SizeType {
15
+ xs?: number;
16
+ sm?: number;
17
+ md?: number;
18
+ lg?: number;
19
+ xl?: number;
20
+ xxl?: number;
21
+ }
22
+ export interface LayoutTableModalPropType {
23
+ /** 打开或关闭 */
24
+ visible: boolean;
25
+ /** 弹窗标题 */
26
+ title: React.ReactNode;
27
+ /** 弹窗宽度 */
28
+ width?: number;
29
+ /** 自定义modal配置 */
30
+ modalConfig?: ModalProps;
31
+ /** 头部渲染额外元素 */
32
+ topExtra?: React.ReactNode;
33
+ /** 搜索表单数据 */
34
+ searchFormList?: FormListType[];
35
+ /** 表单方法 */
36
+ formConfig?: FormProps;
37
+ /** 查询时是否清除选中项 */
38
+ clearSelectIds?: getTableListQueryType['clearSelectIds'];
39
+ /** rowType=checkbox多选 radio单选 list=表格头 tableConfig=自定义配置,支持antd官方表格所有参数*/
40
+ tableColumnsList: {
41
+ /** checkbox多选 radio单选 */
42
+ rowType?: 'checkbox' | 'radio' | undefined;
43
+ /** 表格头 */
44
+ list: TableColumns[];
45
+ /** 自定义配置,支持antd官方表格所有参数 */
46
+ tableConfig?: TableProps<any>;
47
+ };
48
+ /** 是否开启默认查询功能 */
49
+ autoGetList?: boolean;
50
+ /** 查询回调 */
51
+ searchCallback?: (data: any) => Promise<boolean>;
52
+ /** 不需要重置的表单字段 */
53
+ searchNoResetFiled?: string[];
54
+ /** 列表请求函数 */
55
+ apiMethod?: (data: any) => PromiseAxiosResultType;
56
+ /** 查询表单手动参数转换 */
57
+ manualParameterChange?: (params: AnyObjectType) => AnyObjectType;
58
+ /** 静态表格数据 */
59
+ data?: AnyObjectType[];
60
+ /** 已选列表 */
61
+ openSelected?: {
62
+ /** 是否打开 */
63
+ visible: boolean;
64
+ /** 默认已选中 */
65
+ defaultValues?: AnyObjectType[];
66
+ /** 显示的字段名 */
67
+ fileName?: string;
68
+ /** 内容区域高度 */
69
+ height?: number;
70
+ };
71
+ /** 排列方式布局Row */
72
+ rowProps?: RowProps;
73
+ /** 主内容Col */
74
+ colProps?: ColProps;
75
+ /** 左边插槽 */
76
+ leftSlot?: {
77
+ colProps: ColProps;
78
+ jsx: React.ReactNode;
79
+ };
80
+ /** 右边插槽 */
81
+ rightSlot?: {
82
+ colProps: ColProps;
83
+ jsx: React.ReactNode;
84
+ };
85
+ /** 数据调用成功回调 */
86
+ getTableSuccessData?: (data: AnyObjectType) => void;
87
+ /** 行选中回调 */
88
+ onSelect?: GenerateTableProp['extra']['onSelect'];
89
+ /** 关闭弹窗回调 */
90
+ onCancel?: () => void;
91
+ /** 确定弹窗回调 */
92
+ onConfirm?: (rows: AnyObjectType[], ids: string[]) => Promise<boolean>;
93
+ }
94
+ declare const _default: React.ForwardRefExoticComponent<LayoutTableModalPropType & React.RefAttributes<unknown>>;
95
+ export default _default;