@hw-component/form 0.0.9-beta-v22 → 1.0.0

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.
@@ -10,7 +10,7 @@ export interface ModifyPropsModal<P = any> {
10
10
  dialogForm: HDialogFormInstance;
11
11
  afterClose?: VoidFunction;
12
12
  params?: P;
13
- title?: DialogFormProps["title"];
13
+ title?: React.ReactNode;
14
14
  onCancel?: VoidFunction;
15
15
  autoClear?: boolean;
16
16
  }
@@ -20,13 +20,13 @@ export interface ShowParamsModal<P = any, T = any> {
20
20
  initialValues?: Record<string, any>;
21
21
  infoRequest?: PromiseFnResult<P, T>;
22
22
  params?: P;
23
- title?: DialogFormProps["title"];
23
+ title?: React.ReactNode;
24
24
  }
25
25
  export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
26
26
  show: (data?: ShowParamsModal<P, T>) => void;
27
27
  hide: VoidFunction;
28
28
  }
29
- export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest"> {
29
+ export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest" | "title"> {
30
30
  dialogForm?: HDialogFormInstance;
31
31
  onFinish?: (values: T, params: P) => Promise<any>;
32
32
  onCancel?: VoidFunction;
@@ -34,5 +34,6 @@ export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFi
34
34
  infoRequest?: (params: P) => Promise<T>;
35
35
  autoClear?: boolean;
36
36
  contentRender?: (dom: React.ReactNode, form: HDialogFormInstance) => React.ReactNode;
37
+ title?: React.ReactNode;
37
38
  }
38
39
  export {};
@@ -10,7 +10,7 @@ export interface ModifyPropsModal<P = any> {
10
10
  dialogForm: HDialogFormInstance;
11
11
  afterClose?: VoidFunction;
12
12
  params?: P;
13
- title?: DialogFormProps["title"];
13
+ title?: React.ReactNode;
14
14
  onCancel?: VoidFunction;
15
15
  autoClear?: boolean;
16
16
  }
@@ -20,13 +20,13 @@ export interface ShowParamsModal<P = any, T = any> {
20
20
  initialValues?: Record<string, any>;
21
21
  infoRequest?: PromiseFnResult<P, T>;
22
22
  params?: P;
23
- title?: DialogFormProps["title"];
23
+ title?: React.ReactNode;
24
24
  }
25
25
  export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
26
26
  show: (data?: ShowParamsModal<P, T>) => void;
27
27
  hide: VoidFunction;
28
28
  }
29
- export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest"> {
29
+ export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest" | "title"> {
30
30
  dialogForm?: HDialogFormInstance;
31
31
  onFinish?: (values: T, params: P) => Promise<any>;
32
32
  onCancel?: VoidFunction;
@@ -34,5 +34,6 @@ export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFi
34
34
  infoRequest?: (params: P) => Promise<T>;
35
35
  autoClear?: boolean;
36
36
  contentRender?: (dom: React.ReactNode, form: HDialogFormInstance) => React.ReactNode;
37
+ title?: React.ReactNode;
37
38
  }
38
39
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "0.0.9-beta-v22",
3
+ "version": "1.0.0",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@ export interface ModifyPropsModal<P = any> {
12
12
  dialogForm: HDialogFormInstance;
13
13
  afterClose?: VoidFunction;
14
14
  params?: P;
15
- title?: DialogFormProps["title"];
15
+ title?:React.ReactNode;
16
16
  onCancel?: VoidFunction;
17
17
  autoClear?: boolean;
18
18
  }
@@ -22,7 +22,7 @@ export interface ShowParamsModal<P = any, T = any> {
22
22
  initialValues?: Record<string, any>;
23
23
  infoRequest?: PromiseFnResult<P, T>;
24
24
  params?: P;
25
- title?: DialogFormProps["title"];
25
+ title?:React.ReactNode;
26
26
  }
27
27
 
28
28
  export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
@@ -30,7 +30,7 @@ export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
30
30
  hide: VoidFunction;
31
31
  }
32
32
  export interface DialogFormProps<P = any, T = any>
33
- extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest"> {
33
+ extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest"|"title"> {
34
34
  dialogForm?: HDialogFormInstance;
35
35
  onFinish?: (values: T, params: P) => Promise<any>;
36
36
  onCancel?: VoidFunction;
@@ -41,4 +41,5 @@ export interface DialogFormProps<P = any, T = any>
41
41
  dom: React.ReactNode,
42
42
  form: HDialogFormInstance
43
43
  ) => React.ReactNode;
44
+ title?:React.ReactNode;
44
45
  }
@@ -173,7 +173,11 @@ export default () => {
173
173
  >
174
174
  <HModalForm
175
175
  configData={data}
176
+
176
177
  labelWidth={88}
178
+ request={(values, params)=>{
179
+ console.log(values,params)
180
+ }}
177
181
  contentRender={(node, form) => {
178
182
  return (
179
183
  <div>
@@ -183,7 +187,7 @@ export default () => {
183
187
  );
184
188
  }}
185
189
  dialogForm={modalForm}
186
- title="测试"
190
+ title={<div>fff</div>}
187
191
  />
188
192
  </HFormConfigProvider>
189
193
  </>