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
package/lib/Affix/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AffixProps } from 'antd/es/affix';
|
|
2
|
-
type PropType = AffixProps & {
|
|
3
|
-
targetId?: string;
|
|
4
|
-
};
|
|
5
|
-
/** 固钉,当内容区域比较长,需要滚动页面时,这部分内容对应的操作或者导航需要在滚动范围内始终展现 */
|
|
6
|
-
declare const Affix: (props: PropType) => JSX.Element;
|
|
7
|
-
export default Affix;
|
|
1
|
+
import { AffixProps } from 'antd/es/affix';
|
|
2
|
+
type PropType = AffixProps & {
|
|
3
|
+
targetId?: string;
|
|
4
|
+
};
|
|
5
|
+
/** 固钉,当内容区域比较长,需要滚动页面时,这部分内容对应的操作或者导航需要在滚动范围内始终展现 */
|
|
6
|
+
declare const Affix: (props: PropType) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Affix;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface ButtonGroupListType {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string | number;
|
|
6
|
-
selected?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
export interface ButtonGroupTypeProps {
|
|
11
|
-
/** 按钮组数据 */
|
|
12
|
-
data: ButtonGroupListType[];
|
|
13
|
-
className?: string;
|
|
14
|
-
/** button的className */
|
|
15
|
-
buttonClassName?: string;
|
|
16
|
-
/** 按钮大小 */
|
|
17
|
-
size?: 'large' | 'middle' | 'small';
|
|
18
|
-
/** 单选和多选 */
|
|
19
|
-
checkType?: 'checkbox' | 'radio';
|
|
20
|
-
/** 是否打开删除功能 */
|
|
21
|
-
deleteOpen?: boolean;
|
|
22
|
-
/** 按钮删除和选中的回调 */
|
|
23
|
-
onChange?: (data: ButtonGroupListType[]) => void;
|
|
24
|
-
}
|
|
25
|
-
export interface ButtonGroupCallType {
|
|
26
|
-
getButtonGroupSelected: () => ButtonGroupListType[];
|
|
27
|
-
}
|
|
28
|
-
declare const _default: React.ForwardRefExoticComponent<ButtonGroupTypeProps & React.RefAttributes<unknown>>;
|
|
29
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface ButtonGroupListType {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface ButtonGroupTypeProps {
|
|
11
|
+
/** 按钮组数据 */
|
|
12
|
+
data: ButtonGroupListType[];
|
|
13
|
+
className?: string;
|
|
14
|
+
/** button的className */
|
|
15
|
+
buttonClassName?: string;
|
|
16
|
+
/** 按钮大小 */
|
|
17
|
+
size?: 'large' | 'middle' | 'small';
|
|
18
|
+
/** 单选和多选 */
|
|
19
|
+
checkType?: 'checkbox' | 'radio';
|
|
20
|
+
/** 是否打开删除功能 */
|
|
21
|
+
deleteOpen?: boolean;
|
|
22
|
+
/** 按钮删除和选中的回调 */
|
|
23
|
+
onChange?: (data: ButtonGroupListType[]) => void;
|
|
24
|
+
}
|
|
25
|
+
export interface ButtonGroupCallType {
|
|
26
|
+
getButtonGroupSelected: () => ButtonGroupListType[];
|
|
27
|
+
}
|
|
28
|
+
declare const _default: React.ForwardRefExoticComponent<ButtonGroupTypeProps & React.RefAttributes<unknown>>;
|
|
29
|
+
export default _default;
|
package/lib/Dialog/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DraggableEvent, DraggableData } from 'react-draggable';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export type DialogPropType = any;
|
|
5
|
-
interface StateType {
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
bounds: {
|
|
8
|
-
left: number;
|
|
9
|
-
top: number;
|
|
10
|
-
bottom: number;
|
|
11
|
-
right: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
/** 弹窗 */
|
|
15
|
-
declare class Dialog extends React.Component<DialogPropType, StateType> {
|
|
16
|
-
static show(props: any): Dialog;
|
|
17
|
-
static confirm(title: string, children: React.ReactNode, onOk: Function): Dialog;
|
|
18
|
-
draggleRef: any;
|
|
19
|
-
constructor(props: DialogPropType);
|
|
20
|
-
onStart(event: DraggableEvent, uiData: DraggableData): void;
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
close(onOk?: boolean): void;
|
|
23
|
-
}
|
|
24
|
-
export default Dialog;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DraggableEvent, DraggableData } from 'react-draggable';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export type DialogPropType = any;
|
|
5
|
+
interface StateType {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
bounds: {
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
right: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** 弹窗 */
|
|
15
|
+
declare class Dialog extends React.Component<DialogPropType, StateType> {
|
|
16
|
+
static show(props: any): Dialog;
|
|
17
|
+
static confirm(title: string, children: React.ReactNode, onOk: Function): Dialog;
|
|
18
|
+
draggleRef: any;
|
|
19
|
+
constructor(props: DialogPropType);
|
|
20
|
+
onStart(event: DraggableEvent, uiData: DraggableData): void;
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
close(onOk?: boolean): void;
|
|
23
|
+
}
|
|
24
|
+
export default Dialog;
|
package/lib/Empty/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { EmptyProps } from 'antd/lib/empty';
|
|
2
|
-
import './index.less';
|
|
3
|
-
type Props = EmptyProps & {
|
|
4
|
-
/** 区域高度 */
|
|
5
|
-
outerHeight?: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { EmptyProps } from 'antd/lib/empty';
|
|
2
|
+
import './index.less';
|
|
3
|
+
type Props = EmptyProps & {
|
|
4
|
+
/** 区域高度 */
|
|
5
|
+
outerHeight?: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 空内容组件
|
|
9
|
+
*/
|
|
10
|
+
declare const Empty: (props?: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Empty;
|
package/lib/GaoDeMap/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface PropType {
|
|
4
|
-
/** className */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** style内联样式 */
|
|
7
|
-
style?: React.CSSProperties;
|
|
8
|
-
/** 关键字选中回调 */
|
|
9
|
-
onChange?: (data: MapType) => void;
|
|
10
|
-
}
|
|
11
|
-
export type positionType = [number, number];
|
|
12
|
-
export interface MapCallType {
|
|
13
|
-
setMapCenter: (data: positionType, zoom?: number) => void;
|
|
14
|
-
}
|
|
15
|
-
export interface MapType {
|
|
16
|
-
address?: string;
|
|
17
|
-
location: {
|
|
18
|
-
lat: number;
|
|
19
|
-
lng: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
declare const _default: React.ForwardRefExoticComponent<PropType & React.RefAttributes<unknown>>;
|
|
23
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PropType {
|
|
4
|
+
/** className */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** style内联样式 */
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
/** 关键字选中回调 */
|
|
9
|
+
onChange?: (data: MapType) => void;
|
|
10
|
+
}
|
|
11
|
+
export type positionType = [number, number];
|
|
12
|
+
export interface MapCallType {
|
|
13
|
+
setMapCenter: (data: positionType, zoom?: number) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface MapType {
|
|
16
|
+
address?: string;
|
|
17
|
+
location: {
|
|
18
|
+
lat: number;
|
|
19
|
+
lng: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare const _default: React.ForwardRefExoticComponent<PropType & React.RefAttributes<unknown>>;
|
|
23
|
+
export default _default;
|
|
@@ -1,143 +1,141 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioChangeEvent, InputNumberProps, AutoCompleteProps, InputProps } from 'antd';
|
|
3
|
-
import {
|
|
4
|
-
import { ColProps } from 'antd/es/col';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { TimePickerProps } from 'antd/es/time-picker';
|
|
10
|
-
import { RateProps } from 'antd/es/rate';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
/** 支持antd
|
|
134
|
-
|
|
135
|
-
/** 支持antd
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
declare const _default: React.ForwardRefExoticComponent<GenerateFormPropType & React.RefAttributes<unknown>>;
|
|
143
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RadioChangeEvent, InputNumberProps, AutoCompleteProps, InputProps } from 'antd';
|
|
3
|
+
import type { FormInstance, FormProps, Rule, FormItemProps } from 'antd/es/form';
|
|
4
|
+
import type { ColProps } from 'antd/es/col';
|
|
5
|
+
import type { RowProps } from 'antd/es/row';
|
|
6
|
+
import type { RangePickerProps, DatePickerProps } from 'antd/es/date-picker';
|
|
7
|
+
import type { PickerProps } from 'antd/es/date-picker/generatePicker';
|
|
8
|
+
import type { TreeSelectProps } from 'antd/es/tree-select';
|
|
9
|
+
import type { TimeRangePickerProps, TimePickerProps } from 'antd/es/time-picker';
|
|
10
|
+
import type { RateProps } from 'antd/es/rate';
|
|
11
|
+
export type NamePath = any;
|
|
12
|
+
export type DataNode = any;
|
|
13
|
+
export type DefaultValueType = any;
|
|
14
|
+
import { SelectProps } from 'antd/es/select';
|
|
15
|
+
type CheckboxValueType = any;
|
|
16
|
+
import { AnyObjectType, SelectType } from '../brother/typings';
|
|
17
|
+
import './index.less';
|
|
18
|
+
export interface DefaultOptionType {
|
|
19
|
+
value?: string | number;
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
isLeaf?: boolean;
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
children?: Array<DefaultOptionType>;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
type remoteValueType = string | undefined;
|
|
28
|
+
type remotePromiseType = (value: remoteValueType, other?: any) => Promise<SelectType[]>;
|
|
29
|
+
type inputConfig = Omit<InputProps, 'inputMode'> & {
|
|
30
|
+
inputMode?: InputProps['type'];
|
|
31
|
+
};
|
|
32
|
+
interface UnionType {
|
|
33
|
+
componentName: 'Input' | 'Select' | 'DatePicker' | 'TimePicker' | 'RemoteSearch';
|
|
34
|
+
name: FormListType['name'];
|
|
35
|
+
placeholder?: FormListType['placeholder'];
|
|
36
|
+
selectData?: FormListType['selectData'];
|
|
37
|
+
inputConfig?: FormListType['inputConfig'];
|
|
38
|
+
remoteConfig?: FormListType['remoteConfig'];
|
|
39
|
+
datePickerConfig?: FormListType['datePickerConfig'];
|
|
40
|
+
rangePickerConfig?: FormListType['rangePickerConfig'];
|
|
41
|
+
timeRangePickerConfig?: FormListType['timeRangePickerConfig'];
|
|
42
|
+
timePickerConfig?: FormListType['timePickerConfig'];
|
|
43
|
+
rules?: FormListType['rules'];
|
|
44
|
+
}
|
|
45
|
+
export type FormListType = {
|
|
46
|
+
colProps?: ColProps;
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
componentName: 'Input' | 'InputNumber' | 'HideInput' | 'TextArea' | 'AutoComplete' | 'InputAutoComplete' | 'Select' | 'Multiple' | 'MultipleTag' | 'RemoteSearch' | 'DatePicker' | 'RangePicker' | 'TimeRangePicker' | 'TimePicker' | 'Switch' | 'Radio' | 'Checkbox' | 'TreeSelect' | 'Union' | 'RegionSelection' | 'Rate' | 'Null';
|
|
49
|
+
name?: string;
|
|
50
|
+
label?: string | React.ReactNode;
|
|
51
|
+
dependencies?: (string | number)[];
|
|
52
|
+
placeholder?: string;
|
|
53
|
+
rangePickerPlaceholder?: [string, string];
|
|
54
|
+
timeRangePickerPlaceholder?: [string, string];
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
maxLength?: number;
|
|
57
|
+
valuePropName?: string;
|
|
58
|
+
inputConfig?: inputConfig;
|
|
59
|
+
inputNumberConfig?: InputNumberProps & {
|
|
60
|
+
alignRight?: boolean;
|
|
61
|
+
};
|
|
62
|
+
datePickerConfig?: DatePickerProps;
|
|
63
|
+
rangePickerConfig?: RangePickerProps;
|
|
64
|
+
timeRangePickerConfig?: TimeRangePickerProps;
|
|
65
|
+
timePickerConfig?: TimePickerProps;
|
|
66
|
+
inputAutoCompleteConfig?: AutoCompleteProps;
|
|
67
|
+
unionConfig?: {
|
|
68
|
+
unionItems: UnionType[];
|
|
69
|
+
divide?: string;
|
|
70
|
+
};
|
|
71
|
+
selectConfig?: SelectProps<string>;
|
|
72
|
+
selectIsHideAll?: boolean;
|
|
73
|
+
selectData?: SelectType[];
|
|
74
|
+
remoteConfig?: {
|
|
75
|
+
initLoad?: false;
|
|
76
|
+
reLoad?: boolean;
|
|
77
|
+
remoteApi: remotePromiseType;
|
|
78
|
+
remoteMode?: 'multiple' | 'tags';
|
|
79
|
+
allowClear?: boolean;
|
|
80
|
+
showSearch?: boolean;
|
|
81
|
+
};
|
|
82
|
+
regionSelectionConfig?: {
|
|
83
|
+
loadData: DefaultOptionType[];
|
|
84
|
+
selectLoad?: (parentId: string) => Promise<DefaultOptionType[]>;
|
|
85
|
+
};
|
|
86
|
+
rateConfig?: RateProps;
|
|
87
|
+
treeSelectConfig?: {
|
|
88
|
+
data?: {
|
|
89
|
+
title: string;
|
|
90
|
+
value: string;
|
|
91
|
+
children?: string;
|
|
92
|
+
api: (value?: string) => Promise<AnyObjectType[]>;
|
|
93
|
+
onChange?: (value: DataNode[], formItem: FormListType) => FormListType | void;
|
|
94
|
+
};
|
|
95
|
+
extra?: TreeSelectProps<DefaultValueType>;
|
|
96
|
+
};
|
|
97
|
+
rows?: number;
|
|
98
|
+
rules?: Rule[];
|
|
99
|
+
inputAutoCompleteChange?: AutoCompleteProps['onChange'];
|
|
100
|
+
inputChange?: (e: React.ChangeEvent<HTMLInputElement>, other?: any) => void;
|
|
101
|
+
inputNumberChange?: InputNumberProps['onChange'];
|
|
102
|
+
inputEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
103
|
+
textAreaChange?: (e: React.ChangeEvent<HTMLTextAreaElement>, other?: any) => void;
|
|
104
|
+
autoCompleteChange?: (e: string, other?: any) => void;
|
|
105
|
+
selectChange?: (e: string, other?: any) => void;
|
|
106
|
+
multipleChange?: (e: string, other?: any) => void;
|
|
107
|
+
remoteSearchChange?: (e: string, other?: any) => void;
|
|
108
|
+
datePickerChange?: PickerProps<any>['onChange'];
|
|
109
|
+
rangePickerChange?: RangePickerProps['onChange'];
|
|
110
|
+
timeRangePickerChange?: RangePickerProps['onChange'];
|
|
111
|
+
timePickerChange?: PickerProps<any>['onChange'];
|
|
112
|
+
switchChange?: (e: boolean, other?: any) => void;
|
|
113
|
+
radioChange?: (e: RadioChangeEvent, other?: any) => void;
|
|
114
|
+
checkboxChange?: (e: CheckboxValueType[], other?: any) => void;
|
|
115
|
+
cascaderChange?: (e: any, other?: any) => void;
|
|
116
|
+
rateChange?: (e: number, other?: any) => void;
|
|
117
|
+
render?: () => React.ReactElement;
|
|
118
|
+
} & FormItemProps;
|
|
119
|
+
export interface FormCallType {
|
|
120
|
+
getFormValues: (data: string[]) => AnyObjectType;
|
|
121
|
+
setFormFields: FormInstance['setFields'];
|
|
122
|
+
setFormValues: (values: AnyObjectType) => void;
|
|
123
|
+
formSubmit: (nameList?: NamePath[]) => Promise<AnyObjectType>;
|
|
124
|
+
formReset: (fields?: string[]) => void;
|
|
125
|
+
}
|
|
126
|
+
export interface GenerateFormPropType {
|
|
127
|
+
/** 组件类名 */
|
|
128
|
+
className?: string;
|
|
129
|
+
/** 渲染的表单元素 */
|
|
130
|
+
list?: FormListType[];
|
|
131
|
+
/** 支持antd Form组件官方传参所有类型 */
|
|
132
|
+
formConfig?: FormProps;
|
|
133
|
+
/** 支持antd Row组件官方传参所有类型 */
|
|
134
|
+
rowGridConfig?: RowProps;
|
|
135
|
+
/** 支持antd Col组件官方传参所有类型 */
|
|
136
|
+
colGirdConfig?: ColProps;
|
|
137
|
+
/** 动态渲染操作按钮或其他元素 */
|
|
138
|
+
render?: () => React.ReactElement;
|
|
139
|
+
}
|
|
140
|
+
declare const _default: React.ForwardRefExoticComponent<GenerateFormPropType & React.RefAttributes<unknown>>;
|
|
141
|
+
export default _default;
|
|
@@ -1,75 +1,74 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { SelectType, AnyObjectType } from '../../brother/typings';
|
|
4
|
-
import { TableColumns } from '../index';
|
|
5
|
-
import './index.less';
|
|
6
|
-
type remoteValueType = string | undefined;
|
|
7
|
-
type remotePromiseType = (value: remoteValueType, record: AnyObjectType) => Promise<SelectType[]>;
|
|
8
|
-
type SpanType = number | undefined;
|
|
9
|
-
type CellType = {
|
|
10
|
-
rowSpan?: SpanType;
|
|
11
|
-
colSpan?: SpanType;
|
|
12
|
-
};
|
|
13
|
-
export interface EditableColumnsType {
|
|
14
|
-
/** 纵向合并单元格 */
|
|
15
|
-
rowSpanNum: SpanType | ((record: AnyObjectType, index: number) => SpanType);
|
|
16
|
-
/** 横向向合并单元格 */
|
|
17
|
-
colSpanNum: SpanType | ((record: AnyObjectType, index: number) => SpanType);
|
|
18
|
-
/** 是否打开可编辑单元格 */
|
|
19
|
-
editable: boolean | ((record: AnyObjectType, index: number) => boolean);
|
|
20
|
-
/** 整数输入框 */
|
|
21
|
-
inputType: 'number';
|
|
22
|
-
/** 单元格表单类型 */
|
|
23
|
-
valueType: 'Select' | 'AutoComplete' | 'RecordSelect' | 'RemoteSearch' | 'DatePicker' | 'DateTimePicker';
|
|
24
|
-
/** 单元格select值 */
|
|
25
|
-
valueEnum: SelectType[];
|
|
26
|
-
recordSelectField: string;
|
|
27
|
-
/** 表单值改变触发 */
|
|
28
|
-
formChange: (record: AnyObjectType) => AnyObjectType | void;
|
|
29
|
-
remoteConfig: {
|
|
30
|
-
/** 远程搜索的api */
|
|
31
|
-
remoteApi: remotePromiseType;
|
|
32
|
-
/** 远程搜索模式为多选或标签 */
|
|
33
|
-
remoteMode?: 'multiple' | 'tags';
|
|
34
|
-
};
|
|
35
|
-
/** 可编辑单元格表单验证 */
|
|
36
|
-
formItemProps: {
|
|
37
|
-
rules:
|
|
38
|
-
};
|
|
39
|
-
/** 自定义渲染值(在原有的内容上增加新的结构),childNode是原有的内容 */
|
|
40
|
-
controlRender: (record: AnyObjectType, childNode: React.ReactNode) => React.ReactNode;
|
|
41
|
-
/** 表单项placeholder */
|
|
42
|
-
placeholder?: string;
|
|
43
|
-
}
|
|
44
|
-
/** 可编辑单元格 */
|
|
45
|
-
export type EditableCellProps<T = AnyObjectType> = {
|
|
46
|
-
className?: string;
|
|
47
|
-
title: React.ReactNode;
|
|
48
|
-
children: React.ReactNode;
|
|
49
|
-
dataIndex: string;
|
|
50
|
-
recordIndex: number;
|
|
51
|
-
record: T;
|
|
52
|
-
render?: (value: any, record: T, index: number) => React.ReactNode;
|
|
53
|
-
/** 保存表单的值 */
|
|
54
|
-
handleSave: (record: T, dataIndex: string) => void;
|
|
55
|
-
columns: TableColumns[];
|
|
56
|
-
} & EditableColumnsType;
|
|
57
|
-
export
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export default EditableCell;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FormItemProps } from 'antd/es/form';
|
|
3
|
+
import { SelectType, AnyObjectType } from '../../brother/typings';
|
|
4
|
+
import { TableColumns } from '../index';
|
|
5
|
+
import './index.less';
|
|
6
|
+
type remoteValueType = string | undefined;
|
|
7
|
+
type remotePromiseType = (value: remoteValueType, record: AnyObjectType) => Promise<SelectType[]>;
|
|
8
|
+
type SpanType = number | undefined;
|
|
9
|
+
type CellType = {
|
|
10
|
+
rowSpan?: SpanType;
|
|
11
|
+
colSpan?: SpanType;
|
|
12
|
+
};
|
|
13
|
+
export interface EditableColumnsType {
|
|
14
|
+
/** 纵向合并单元格 */
|
|
15
|
+
rowSpanNum: SpanType | ((record: AnyObjectType, index: number) => SpanType);
|
|
16
|
+
/** 横向向合并单元格 */
|
|
17
|
+
colSpanNum: SpanType | ((record: AnyObjectType, index: number) => SpanType);
|
|
18
|
+
/** 是否打开可编辑单元格 */
|
|
19
|
+
editable: boolean | ((record: AnyObjectType, index: number) => boolean);
|
|
20
|
+
/** 整数输入框 */
|
|
21
|
+
inputType: 'number';
|
|
22
|
+
/** 单元格表单类型 */
|
|
23
|
+
valueType: 'Select' | 'AutoComplete' | 'RecordSelect' | 'RemoteSearch' | 'DatePicker' | 'DateTimePicker';
|
|
24
|
+
/** 单元格select值 */
|
|
25
|
+
valueEnum: SelectType[];
|
|
26
|
+
recordSelectField: string;
|
|
27
|
+
/** 表单值改变触发 */
|
|
28
|
+
formChange: (record: AnyObjectType) => AnyObjectType | void;
|
|
29
|
+
remoteConfig: {
|
|
30
|
+
/** 远程搜索的api */
|
|
31
|
+
remoteApi: remotePromiseType;
|
|
32
|
+
/** 远程搜索模式为多选或标签 */
|
|
33
|
+
remoteMode?: 'multiple' | 'tags';
|
|
34
|
+
};
|
|
35
|
+
/** 可编辑单元格表单验证 */
|
|
36
|
+
formItemProps: {
|
|
37
|
+
rules: FormItemProps['rules'];
|
|
38
|
+
};
|
|
39
|
+
/** 自定义渲染值(在原有的内容上增加新的结构),childNode是原有的内容 */
|
|
40
|
+
controlRender: (record: AnyObjectType, childNode: React.ReactNode) => React.ReactNode;
|
|
41
|
+
/** 表单项placeholder */
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
}
|
|
44
|
+
/** 可编辑单元格 */
|
|
45
|
+
export type EditableCellProps<T = AnyObjectType> = {
|
|
46
|
+
className?: string;
|
|
47
|
+
title: React.ReactNode;
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
dataIndex: string;
|
|
50
|
+
recordIndex: number;
|
|
51
|
+
record: T;
|
|
52
|
+
render?: (value: any, record: T, index: number) => React.ReactNode;
|
|
53
|
+
/** 保存表单的值 */
|
|
54
|
+
handleSave: (record: T, dataIndex: string) => void;
|
|
55
|
+
columns: TableColumns[];
|
|
56
|
+
} & EditableColumnsType;
|
|
57
|
+
export interface DraggableBodyRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
58
|
+
/** 虚拟表格 */
|
|
59
|
+
vc?: any;
|
|
60
|
+
/** 是否打开拖拽功能 */
|
|
61
|
+
open: boolean;
|
|
62
|
+
/** 拖拽事件 */
|
|
63
|
+
moveRow: (dragIndex: number, hoverIndex: number) => void;
|
|
64
|
+
/** 索引 */
|
|
65
|
+
index: number;
|
|
66
|
+
}
|
|
67
|
+
export declare const EditableRow: React.ForwardRefExoticComponent<DraggableBodyRowProps & {
|
|
68
|
+
isVirtual?: boolean;
|
|
69
|
+
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
70
|
+
/** 可编辑单元格 */
|
|
71
|
+
declare const EditableCell: React.FC<EditableCellProps & CellType & {
|
|
72
|
+
isVirtual?: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
export default EditableCell;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const ResizableTitle: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
3
|
+
export default ResizableTitle;
|