@hw-component/form 0.0.1-beta-v6 → 0.0.1-beta-v8
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/es/CheckboxGroup/index.d.ts +1 -1
- package/es/DialogForm/DrawerForm/Footer.d.ts +4 -0
- package/es/DialogForm/DrawerForm/Footer.js +23 -0
- package/es/DialogForm/DrawerForm/Title.d.ts +4 -0
- package/es/DialogForm/DrawerForm/Title.js +18 -0
- package/es/DialogForm/DrawerForm/index.d.ts +4 -0
- package/es/DialogForm/DrawerForm/index.js +111 -0
- package/es/DialogForm/ModalForm.d.ts +4 -0
- package/es/{ModalForm/index.js → DialogForm/ModalForm.js} +39 -9
- package/es/DialogForm/hooks.d.ts +15 -0
- package/es/{ModalForm → DialogForm}/hooks.js +58 -13
- package/es/{ModalForm → DialogForm}/modal.d.ts +7 -4
- package/es/Form/HFormConnect.d.ts +1 -2
- package/es/Form/HFormConnect.js +8 -15
- package/es/Form/config.d.ts +4 -4
- package/es/Form/config.js +4 -4
- package/es/Form/modal.d.ts +7 -1
- package/es/Input/SelectInput.d.ts +1 -1
- package/es/TDPicker/RangePicker.d.ts +1 -1
- package/es/Upload/UrlUpload/index.d.ts +2 -2
- package/es/Upload/UrlUpload/index.js +3 -3
- package/es/Upload/index.d.ts +1 -2
- package/es/Upload/index.js +39 -5
- package/es/Upload/modal.d.ts +2 -0
- package/es/index.d.ts +7 -6
- package/es/index.js +5 -3
- package/lib/CheckboxGroup/index.d.ts +1 -1
- package/lib/DialogForm/DrawerForm/Footer.d.ts +4 -0
- package/lib/DialogForm/DrawerForm/Footer.js +26 -0
- package/lib/DialogForm/DrawerForm/Title.d.ts +4 -0
- package/lib/DialogForm/DrawerForm/Title.js +21 -0
- package/lib/DialogForm/DrawerForm/index.d.ts +4 -0
- package/lib/DialogForm/DrawerForm/index.js +114 -0
- package/lib/DialogForm/ModalForm.d.ts +4 -0
- package/lib/{ModalForm/index.js → DialogForm/ModalForm.js} +38 -8
- package/lib/DialogForm/hooks.d.ts +15 -0
- package/lib/{ModalForm → DialogForm}/hooks.js +59 -13
- package/lib/{ModalForm → DialogForm}/modal.d.ts +7 -4
- package/lib/Form/HFormConnect.d.ts +1 -2
- package/lib/Form/HFormConnect.js +8 -15
- package/lib/Form/config.d.ts +4 -4
- package/lib/Form/modal.d.ts +7 -1
- package/lib/Input/SelectInput.d.ts +1 -1
- package/lib/TDPicker/RangePicker.d.ts +1 -1
- package/lib/Upload/UrlUpload/index.d.ts +2 -2
- package/lib/Upload/UrlUpload/index.js +3 -3
- package/lib/Upload/index.d.ts +1 -2
- package/lib/Upload/index.js +39 -5
- package/lib/Upload/modal.d.ts +2 -0
- package/lib/index.d.ts +7 -6
- package/lib/index.js +7 -4
- package/package.json +1 -1
- package/src/components/DialogForm/DrawerForm/Footer.tsx +19 -0
- package/src/components/DialogForm/DrawerForm/Title.tsx +12 -0
- package/src/components/DialogForm/DrawerForm/index.tsx +85 -0
- package/src/components/{ModalForm/index.tsx → DialogForm/ModalForm.tsx} +14 -6
- package/src/components/{ModalForm → DialogForm}/hooks.ts +36 -11
- package/src/components/{ModalForm → DialogForm}/modal.ts +7 -4
- package/src/components/Form/HFormConnect.tsx +21 -7
- package/src/components/Form/config.ts +2 -2
- package/src/components/Form/modal.ts +7 -1
- package/src/components/Input/SelectInput.tsx +1 -0
- package/src/components/TDPicker/modal.ts +0 -1
- package/src/components/Upload/UrlUpload/index.tsx +2 -2
- package/src/components/Upload/index.tsx +39 -7
- package/src/components/Upload/modal.ts +2 -0
- package/src/components/index.tsx +5 -4
- package/src/pages/DrawerForm/index.tsx +127 -0
- package/src/pages/Form/index.tsx +3 -0
- package/src/pages/ModalForm/index.tsx +2 -2
- package/src/routes.tsx +7 -0
- package/es/ModalForm/hooks.d.ts +0 -12
- package/es/ModalForm/index.d.ts +0 -4
- package/lib/ModalForm/hooks.d.ts +0 -12
- package/lib/ModalForm/index.d.ts +0 -4
|
@@ -25,11 +25,17 @@ const formatMaker = (
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export default (
|
|
28
|
-
|
|
28
|
+
component:
|
|
29
|
+
| React.FunctionComponent
|
|
30
|
+
| React.ComponentClass
|
|
31
|
+
| React.ForwardRefRenderFunction<any, any>,
|
|
29
32
|
config: ConnectConfigModal = {}
|
|
30
33
|
) => {
|
|
31
34
|
const { format = {} } = config;
|
|
32
|
-
|
|
35
|
+
const Index: React.ForwardRefRenderFunction<any, HFormItemProps> = (
|
|
36
|
+
props: HFormItemProps,
|
|
37
|
+
ref
|
|
38
|
+
) => {
|
|
33
39
|
const { name = "" } = props;
|
|
34
40
|
|
|
35
41
|
const { form, valueType = "float" } = useFormContext();
|
|
@@ -44,10 +50,18 @@ export default (
|
|
|
44
50
|
const addDispatchListener = (key: string, fn: argsFn) => {
|
|
45
51
|
form?.addDispatchListener({ key, name }, fn);
|
|
46
52
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
const Component = component as React.ForwardRefRenderFunction<
|
|
54
|
+
any,
|
|
55
|
+
ConnectResultProps
|
|
56
|
+
>;
|
|
57
|
+
return (
|
|
58
|
+
<Component
|
|
59
|
+
{...props}
|
|
60
|
+
addFormat={addFormat}
|
|
61
|
+
addDispatchListener={addDispatchListener}
|
|
62
|
+
ref={ref}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
52
65
|
};
|
|
66
|
+
return React.forwardRef(Index);
|
|
53
67
|
};
|
|
@@ -14,7 +14,7 @@ import HUpload from "../Upload";
|
|
|
14
14
|
import HUrlUpload from "../Upload/UrlUpload";
|
|
15
15
|
import HSubmit from "../Submit";
|
|
16
16
|
import FormConfigProvider from "../Form/Context/FormConfigProvider";
|
|
17
|
-
import TextArea from
|
|
17
|
+
import TextArea from "../TextArea";
|
|
18
18
|
export const placeholderConfig = {
|
|
19
19
|
inputType: ["input", "inputNumber", "selectInput", "buttonInput"],
|
|
20
20
|
selectType: ["select", "datePicker", "timePicker"],
|
|
@@ -37,5 +37,5 @@ export default {
|
|
|
37
37
|
urlUpload: HUrlUpload,
|
|
38
38
|
submit: HSubmit,
|
|
39
39
|
formConfigProvider: FormConfigProvider,
|
|
40
|
-
textArea:TextArea
|
|
40
|
+
textArea: TextArea,
|
|
41
41
|
};
|
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
ValueSwitchMapModal,
|
|
26
26
|
DateRangePickerValueMapModal,
|
|
27
27
|
} from "../modal";
|
|
28
|
+
import type { ForwardedRef } from "react";
|
|
28
29
|
type RenderFun = (
|
|
29
30
|
props: HItemProps,
|
|
30
31
|
node: React.ReactNode,
|
|
@@ -80,6 +81,8 @@ export interface HFormProps<T = any, R = any> extends Omit<FormProps, "form"> {
|
|
|
80
81
|
|
|
81
82
|
export interface HFormItemProps extends HItemProps {
|
|
82
83
|
required?: boolean;
|
|
84
|
+
value?: any;
|
|
85
|
+
onChange?: (val: any, item: any) => void;
|
|
83
86
|
}
|
|
84
87
|
export interface FormItemWithRender extends Omit<HFormItemProps, "render"> {
|
|
85
88
|
render: (form: HFormInstance) => React.ReactNode;
|
|
@@ -142,7 +145,10 @@ export interface addFormatItemModal {
|
|
|
142
145
|
outputValue: addValueFormat;
|
|
143
146
|
}
|
|
144
147
|
|
|
145
|
-
export interface ConnectResultProps {
|
|
148
|
+
export interface ConnectResultProps extends HFormItemProps {
|
|
146
149
|
addFormat?: (format: Record<string, addFormatItemModal>) => void;
|
|
147
150
|
addDispatchListener?: (key: string, fn: argsFn) => void;
|
|
151
|
+
ref?: ForwardedRef<any>;
|
|
152
|
+
value?: any;
|
|
153
|
+
onChange?: (value: any, item?: any) => void;
|
|
148
154
|
}
|
|
@@ -3,6 +3,7 @@ import type { HSelectInputProps } from "./modal";
|
|
|
3
3
|
import HSelect from "../Select";
|
|
4
4
|
import { defaultSelectStyle, defaultValueName } from "./defaultConfig";
|
|
5
5
|
import HFormConnect from "../Form/HFormConnect";
|
|
6
|
+
import { ConnectResultProps } from "@/components/Form/modal";
|
|
6
7
|
export enum SelectInputType {
|
|
7
8
|
input,
|
|
8
9
|
select,
|
|
@@ -6,7 +6,6 @@ import type { TimePickerProps } from "antd";
|
|
|
6
6
|
import type { DurationInputArg2 } from "moment";
|
|
7
7
|
import type { DateRangePickerValueMapModal } from "../modal";
|
|
8
8
|
import type { addFormatItemModal } from "@/components/Form/modal";
|
|
9
|
-
import type { argsFn } from "@/components/Form/modal";
|
|
10
9
|
export interface HDatePickerProps
|
|
11
10
|
extends Omit<DatePickerProps, "onChange" | "format" | "ranges"> {
|
|
12
11
|
onChange?: (time?: Moment | string | number) => void;
|
|
@@ -5,8 +5,7 @@ import type { IUploadRefModal, IUrlUploadProps } from "../modal";
|
|
|
5
5
|
import TypeEle from "../MediaTypeEle/TypeEle";
|
|
6
6
|
import { useRef, useState } from "react";
|
|
7
7
|
import type { RcFile, UploadFile } from "antd/es/upload/interface";
|
|
8
|
-
|
|
9
|
-
export default ({
|
|
8
|
+
const Index = ({
|
|
10
9
|
placeholder = "请输入文件地址",
|
|
11
10
|
value = [],
|
|
12
11
|
onChange,
|
|
@@ -89,3 +88,4 @@ export default ({
|
|
|
89
88
|
</Space>
|
|
90
89
|
);
|
|
91
90
|
};
|
|
91
|
+
export default Index;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Upload } from "antd";
|
|
2
|
-
import Btn from "./Btn";
|
|
3
1
|
import React, { useImperativeHandle, useMemo, useState } from "react";
|
|
2
|
+
import type { IUpLoadProps, IUploadRefModal } from "./modal";
|
|
3
|
+
import { useProps } from "./hooks/propsMaker";
|
|
4
4
|
import type { IPreviewProps } from "./Preview";
|
|
5
5
|
import Preview from "./Preview";
|
|
6
6
|
import { useChange } from "./hooks/change";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { Upload } from "antd";
|
|
8
|
+
import Btn from "./Btn";
|
|
9
|
+
import HFormConnect from "../Form/HFormConnect";
|
|
9
10
|
|
|
10
11
|
const Index: React.ForwardRefRenderFunction<IUploadRefModal, IUpLoadProps> = (
|
|
11
12
|
{
|
|
@@ -18,6 +19,7 @@ const Index: React.ForwardRefRenderFunction<IUploadRefModal, IUpLoadProps> = (
|
|
|
18
19
|
onPreview,
|
|
19
20
|
request,
|
|
20
21
|
maxSize,
|
|
22
|
+
addFormat,
|
|
21
23
|
...props
|
|
22
24
|
},
|
|
23
25
|
ref
|
|
@@ -52,10 +54,40 @@ const Index: React.ForwardRefRenderFunction<IUploadRefModal, IUpLoadProps> = (
|
|
|
52
54
|
file,
|
|
53
55
|
});
|
|
54
56
|
};
|
|
55
|
-
|
|
56
57
|
const maxNum = maxCount === 1 ? maxCount : Number.MAX_VALUE;
|
|
57
58
|
const { visible, file: previewFile } = previewModal;
|
|
58
|
-
|
|
59
|
+
addFormat?.({
|
|
60
|
+
float: {
|
|
61
|
+
inputValue: (item, initValue) => {
|
|
62
|
+
const { name = "" } = item;
|
|
63
|
+
const initFileList = initValue[name] || [];
|
|
64
|
+
const fileList = initFileList.map((url, index) => {
|
|
65
|
+
return {
|
|
66
|
+
name: url,
|
|
67
|
+
response: {
|
|
68
|
+
url,
|
|
69
|
+
},
|
|
70
|
+
status: "done",
|
|
71
|
+
uid: `init-${index}`,
|
|
72
|
+
thumbUrl: url,
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
[name]: fileList,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
outputValue: (item, outputValue) => {
|
|
80
|
+
const { name: valueName = "" } = item;
|
|
81
|
+
const { [valueName]: itemVal = [] } = outputValue;
|
|
82
|
+
const urls = itemVal.map((fileItem) => {
|
|
83
|
+
return fileItem.response.url;
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
[valueName]: urls,
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
59
91
|
return (
|
|
60
92
|
<div style={contentStyle}>
|
|
61
93
|
<Upload
|
|
@@ -82,4 +114,4 @@ const Index: React.ForwardRefRenderFunction<IUploadRefModal, IUpLoadProps> = (
|
|
|
82
114
|
);
|
|
83
115
|
};
|
|
84
116
|
|
|
85
|
-
export default React.forwardRef(Index);
|
|
117
|
+
export default HFormConnect(React.forwardRef(Index));
|
|
@@ -3,6 +3,7 @@ import type { UploadFile } from "antd/es/upload/interface";
|
|
|
3
3
|
import type { BeforeUploadFileType, RcFile } from "rc-upload/lib/interface";
|
|
4
4
|
import type { UploadChangeParam } from "antd/lib/upload/interface";
|
|
5
5
|
import type { MediaTypeEnum } from "@/components/Upload/enums";
|
|
6
|
+
import type { addFormatItemModal } from "@/components/Form/modal";
|
|
6
7
|
|
|
7
8
|
export interface IUpLoadProps extends Omit<UploadProps, "onChange"> {
|
|
8
9
|
exFiles?: string[];
|
|
@@ -14,6 +15,7 @@ export interface IUpLoadProps extends Omit<UploadProps, "onChange"> {
|
|
|
14
15
|
value?: UploadFile[];
|
|
15
16
|
maxRowNum?: number;
|
|
16
17
|
maxSize?: number;
|
|
18
|
+
addFormat?: (config: Record<string, addFormatItemModal>) => void;
|
|
17
19
|
}
|
|
18
20
|
export interface IMediaTypeEleProps {
|
|
19
21
|
file?: UploadFile;
|
package/src/components/index.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import FormConfig from "./Form/config";
|
|
|
3
3
|
import PageHandler from "./PageHandler";
|
|
4
4
|
export { default as HForm } from "./Form";
|
|
5
5
|
export { default as useHForm } from "./Form/hooks/useHForm";
|
|
6
|
-
export {
|
|
7
|
-
import ModalForm from "./ModalForm";
|
|
8
|
-
|
|
6
|
+
export { useHDialogForm } from "./DialogForm/hooks";
|
|
7
|
+
import ModalForm from "./DialogForm/ModalForm";
|
|
8
|
+
import DrawerForm from "./DialogForm/DrawerForm";
|
|
9
9
|
export const HSelect = FormConfig.select;
|
|
10
10
|
export const HInput = FormConfig.input;
|
|
11
11
|
export const HSelectInput = FormConfig.selectInput;
|
|
@@ -22,5 +22,6 @@ export const HTimePicker = FormConfig.timePicker;
|
|
|
22
22
|
export const HInputNumber = FormConfig.inputNumber;
|
|
23
23
|
export const HPageHandler = PageHandler;
|
|
24
24
|
export const HFormConfigProvider = FormConfig.formConfigProvider;
|
|
25
|
-
export const
|
|
25
|
+
export const HTextArea = FormConfig.textArea;
|
|
26
26
|
export const HModalForm = ModalForm;
|
|
27
|
+
export const HDrawerForm = DrawerForm;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Button } from "antd";
|
|
2
|
+
import { HDrawerForm, useHDiaLogForm } from "../../components";
|
|
3
|
+
const data = [
|
|
4
|
+
{
|
|
5
|
+
label: "输入框",
|
|
6
|
+
name: "name",
|
|
7
|
+
rules: [
|
|
8
|
+
() => {
|
|
9
|
+
return {
|
|
10
|
+
required: true,
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "数字",
|
|
17
|
+
name: "sz",
|
|
18
|
+
type: "inputNumber",
|
|
19
|
+
rules: [{ required: true }],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "下拉输入框",
|
|
23
|
+
name: "selectInput",
|
|
24
|
+
type: "selectInput",
|
|
25
|
+
rules: [{ required: true }],
|
|
26
|
+
itemProps: {
|
|
27
|
+
valueName: {
|
|
28
|
+
select: "op",
|
|
29
|
+
input: "opInput",
|
|
30
|
+
},
|
|
31
|
+
selectProps: {
|
|
32
|
+
options: [{ label: "测试", value: 1 }],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "按钮输入框",
|
|
38
|
+
name: "buttonInput",
|
|
39
|
+
type: "buttonInput",
|
|
40
|
+
children: "点击",
|
|
41
|
+
rules: [{ required: true }],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "选择",
|
|
45
|
+
name: "checkboxGroup",
|
|
46
|
+
type: "checkboxGroup",
|
|
47
|
+
rules: [{ required: true }],
|
|
48
|
+
helper: "帮助我",
|
|
49
|
+
options: [
|
|
50
|
+
{ label: "选择1", value: "check1" },
|
|
51
|
+
{ label: "选择2", value: "check2" },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "开关",
|
|
56
|
+
name: "switch",
|
|
57
|
+
type: "switch",
|
|
58
|
+
rules: [{ required: true }],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: "时间",
|
|
62
|
+
name: "datePicker",
|
|
63
|
+
type: "datePicker",
|
|
64
|
+
hover: "时间选择",
|
|
65
|
+
helper: "帮助我",
|
|
66
|
+
rules: [{ required: true }],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "时间段",
|
|
70
|
+
name: "rangePicker",
|
|
71
|
+
type: "rangePicker",
|
|
72
|
+
helper: "帮助我",
|
|
73
|
+
rules: [{ required: true }],
|
|
74
|
+
itemProps: {
|
|
75
|
+
valueMap: {
|
|
76
|
+
start: "testStart",
|
|
77
|
+
end: "testEnd",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "时分秒",
|
|
83
|
+
name: "timePicker",
|
|
84
|
+
type: "timePicker",
|
|
85
|
+
rules: [{ required: true }],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: "文件",
|
|
89
|
+
name: "upload",
|
|
90
|
+
type: "upload",
|
|
91
|
+
rules: [{ required: true }],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "地址文件",
|
|
95
|
+
name: "urlUpload",
|
|
96
|
+
type: "urlUpload",
|
|
97
|
+
rules: [{ required: true }],
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
export default () => {
|
|
101
|
+
const modalForm = useHDiaLogForm();
|
|
102
|
+
return (
|
|
103
|
+
<>
|
|
104
|
+
<Button
|
|
105
|
+
onClick={() => {
|
|
106
|
+
modalForm.show({
|
|
107
|
+
initialValues: {
|
|
108
|
+
check1: 1,
|
|
109
|
+
testStart: "1694747960",
|
|
110
|
+
testEnd: "1693538359",
|
|
111
|
+
op: 1,
|
|
112
|
+
opInput: "12121",
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
打开
|
|
118
|
+
</Button>
|
|
119
|
+
<HDrawerForm
|
|
120
|
+
configData={data}
|
|
121
|
+
labelWidth={88}
|
|
122
|
+
modalForm={modalForm}
|
|
123
|
+
title="测试"
|
|
124
|
+
/>
|
|
125
|
+
</>
|
|
126
|
+
);
|
|
127
|
+
};
|
package/src/pages/Form/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button } from "antd";
|
|
2
|
-
import { HModalForm,
|
|
2
|
+
import { HModalForm, useHDiaLogForm } from "../../components";
|
|
3
3
|
const data = [
|
|
4
4
|
{
|
|
5
5
|
label: "输入框",
|
|
@@ -98,7 +98,7 @@ const data = [
|
|
|
98
98
|
},
|
|
99
99
|
];
|
|
100
100
|
export default () => {
|
|
101
|
-
const modalForm =
|
|
101
|
+
const modalForm = useHDiaLogForm();
|
|
102
102
|
return (
|
|
103
103
|
<>
|
|
104
104
|
<Button
|
package/src/routes.tsx
CHANGED
|
@@ -9,6 +9,8 @@ import DatePicker from "./pages/DatePicker";
|
|
|
9
9
|
import Upload from "./pages/Upload";
|
|
10
10
|
import Form from "./pages/Form";
|
|
11
11
|
import ModalForm from "./pages/ModalForm";
|
|
12
|
+
import DrawerForm from "./pages/DrawerForm";
|
|
13
|
+
|
|
12
14
|
export interface RouteModal {
|
|
13
15
|
path?: string;
|
|
14
16
|
name?: string;
|
|
@@ -68,6 +70,11 @@ const routes: RouteModal[] = [
|
|
|
68
70
|
name: "弹窗表单",
|
|
69
71
|
element: <ModalForm />,
|
|
70
72
|
},
|
|
73
|
+
{
|
|
74
|
+
path: "/drawerForm",
|
|
75
|
+
name: "抽屉表单",
|
|
76
|
+
element: <DrawerForm />,
|
|
77
|
+
},
|
|
71
78
|
];
|
|
72
79
|
|
|
73
80
|
export default routes;
|
package/es/ModalForm/hooks.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { HModalFormInstance, ModifyPropsModal } from "@/components/ModalForm/modal";
|
|
3
|
-
export declare const useModifyProps: ({ visible, configData, initialValues, modalForm, }: ModifyPropsModal) => {
|
|
4
|
-
modalFormData: import("../Form/modal").HItemProps[];
|
|
5
|
-
modalVisible: boolean | undefined;
|
|
6
|
-
setModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
|
|
7
|
-
setModalFormData: import("react").Dispatch<import("react").SetStateAction<import("../Form/modal").HItemProps[]>>;
|
|
8
|
-
initValue: Record<string, any> | undefined;
|
|
9
|
-
setInitValue: import("react").Dispatch<import("react").SetStateAction<Record<string, any> | undefined>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const useHModalForm: () => HModalFormInstance;
|
|
12
|
-
export declare const useCurrentForm: (hModalForm?: HModalFormInstance) => HModalFormInstance;
|
package/es/ModalForm/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ModalFormProps } from "@/components/ModalForm/modal";
|
|
3
|
-
declare const _default: ({ visible, title, onCancel, configData, infoRequest, request, afterClose, modalForm, initialValues, ...props }: ModalFormProps) => JSX.Element;
|
|
4
|
-
export default _default;
|
package/lib/ModalForm/hooks.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { HModalFormInstance, ModifyPropsModal } from "@/components/ModalForm/modal";
|
|
3
|
-
export declare const useModifyProps: ({ visible, configData, initialValues, modalForm, }: ModifyPropsModal) => {
|
|
4
|
-
modalFormData: import("../Form/modal").HItemProps[];
|
|
5
|
-
modalVisible: boolean | undefined;
|
|
6
|
-
setModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
|
|
7
|
-
setModalFormData: import("react").Dispatch<import("react").SetStateAction<import("../Form/modal").HItemProps[]>>;
|
|
8
|
-
initValue: Record<string, any> | undefined;
|
|
9
|
-
setInitValue: import("react").Dispatch<import("react").SetStateAction<Record<string, any> | undefined>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const useHModalForm: () => HModalFormInstance;
|
|
12
|
-
export declare const useCurrentForm: (hModalForm?: HModalFormInstance) => HModalFormInstance;
|
package/lib/ModalForm/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ModalFormProps } from "@/components/ModalForm/modal";
|
|
3
|
-
declare const _default: ({ visible, title, onCancel, configData, infoRequest, request, afterClose, modalForm, initialValues, ...props }: ModalFormProps) => JSX.Element;
|
|
4
|
-
export default _default;
|