@hw-component/form 1.10.48 → 1.10.50

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.
@@ -90,6 +90,11 @@ var useModifyProps = function useModifyProps(_ref) {
90
90
  dialogForm.getParams = function () {
91
91
  return formParams || {};
92
92
  };
93
+ dialogForm.setParams = function (newParams) {
94
+ setFormParams(function (oldParams) {
95
+ return _objectSpread(_objectSpread({}, oldParams), newParams);
96
+ });
97
+ };
93
98
  return {
94
99
  modalFormData: modalFormData,
95
100
  modalVisible: modalVisible,
@@ -110,7 +115,8 @@ var useHDialogForm = function useHDialogForm() {
110
115
  hide: function hide() {},
111
116
  getParams: function getParams() {
112
117
  return {};
113
- }
118
+ },
119
+ setParams: function setParams() {}
114
120
  });
115
121
  }, []);
116
122
  };
@@ -26,6 +26,7 @@ export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
26
26
  show: (data?: ShowParamsModal<P, T>) => void;
27
27
  hide: VoidFunction;
28
28
  getParams: () => Record<string, any>;
29
+ setParams: (params: Record<string, any>) => void;
29
30
  }
30
31
  export type FooterRender = (dialogForm?: HDialogFormInstance, loading?: boolean, params?: Record<string, any>) => React.ReactNode;
31
32
  export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest" | "title" | "footer" | "configData"> {
package/es/index.css CHANGED
@@ -305,10 +305,22 @@
305
305
  border-color: #ff4d4f !important;
306
306
  }
307
307
  .ant-hw-input-group-before-body .ant-hw-input-group-number-body {
308
+ border-radius: 0;
309
+ border-top-right-radius: 2px;
310
+ border-bottom-right-radius: 2px;
311
+ }
312
+ .ant-hw-input-group-before-body > .ant-picker {
313
+ border-radius: 0;
308
314
  border-top-right-radius: 2px;
309
315
  border-bottom-right-radius: 2px;
310
316
  }
311
317
  .ant-hw-input-group-after-body .ant-hw-input-group-number-body {
318
+ border-radius: 0;
319
+ border-top-left-radius: 2px;
320
+ border-bottom-left-radius: 2px;
321
+ }
322
+ .ant-hw-input-group-after-body > .ant-picker {
323
+ border-radius: 0;
312
324
  border-top-left-radius: 2px;
313
325
  border-bottom-left-radius: 2px;
314
326
  }
@@ -91,6 +91,11 @@ var useModifyProps = function useModifyProps(_ref) {
91
91
  dialogForm.getParams = function () {
92
92
  return formParams || {};
93
93
  };
94
+ dialogForm.setParams = function (newParams) {
95
+ setFormParams(function (oldParams) {
96
+ return _objectSpread(_objectSpread({}, oldParams), newParams);
97
+ });
98
+ };
94
99
  return {
95
100
  modalFormData: modalFormData,
96
101
  modalVisible: modalVisible,
@@ -111,7 +116,8 @@ var useHDialogForm = function useHDialogForm() {
111
116
  hide: function hide() {},
112
117
  getParams: function getParams() {
113
118
  return {};
114
- }
119
+ },
120
+ setParams: function setParams() {}
115
121
  });
116
122
  }, []);
117
123
  };
@@ -26,6 +26,7 @@ export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
26
26
  show: (data?: ShowParamsModal<P, T>) => void;
27
27
  hide: VoidFunction;
28
28
  getParams: () => Record<string, any>;
29
+ setParams: (params: Record<string, any>) => void;
29
30
  }
30
31
  export type FooterRender = (dialogForm?: HDialogFormInstance, loading?: boolean, params?: Record<string, any>) => React.ReactNode;
31
32
  export interface DialogFormProps<P = any, T = any> extends Omit<RootProps, "onFinish" | "onCancel" | "onOk" | "infoRequest" | "title" | "footer" | "configData"> {
package/lib/index.css CHANGED
@@ -305,10 +305,22 @@
305
305
  border-color: #ff4d4f !important;
306
306
  }
307
307
  .ant-hw-input-group-before-body .ant-hw-input-group-number-body {
308
+ border-radius: 0;
309
+ border-top-right-radius: 2px;
310
+ border-bottom-right-radius: 2px;
311
+ }
312
+ .ant-hw-input-group-before-body > .ant-picker {
313
+ border-radius: 0;
308
314
  border-top-right-radius: 2px;
309
315
  border-bottom-right-radius: 2px;
310
316
  }
311
317
  .ant-hw-input-group-after-body .ant-hw-input-group-number-body {
318
+ border-radius: 0;
319
+ border-top-left-radius: 2px;
320
+ border-bottom-left-radius: 2px;
321
+ }
322
+ .ant-hw-input-group-after-body > .ant-picker {
323
+ border-radius: 0;
312
324
  border-top-left-radius: 2px;
313
325
  border-bottom-left-radius: 2px;
314
326
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.48",
3
+ "version": "1.10.50",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,6 +75,14 @@ export const useModifyProps = ({
75
75
  dialogForm.getParams = () => {
76
76
  return (formParams as Record<string, any>) || {};
77
77
  };
78
+ dialogForm.setParams=(newParams)=>{
79
+ setFormParams((oldParams)=>{
80
+ return {
81
+ ...oldParams,
82
+ ...newParams,
83
+ }
84
+ });
85
+ }
78
86
  return {
79
87
  modalFormData,
80
88
  modalVisible,
@@ -97,6 +105,7 @@ export const useHDialogForm = () => {
97
105
  getParams: () => {
98
106
  return {};
99
107
  },
108
+ setParams: () => {}
100
109
  };
101
110
  }, []);
102
111
  };
@@ -29,6 +29,7 @@ export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
29
29
  show: (data?: ShowParamsModal<P, T>) => void;
30
30
  hide: VoidFunction;
31
31
  getParams: () => Record<string, any>;
32
+ setParams: (params: Record<string, any>) => void;
32
33
  }
33
34
  export type FooterRender = (
34
35
  dialogForm?: HDialogFormInstance,
@@ -27,12 +27,24 @@
27
27
  }
28
28
  .@{all-input-group}-before-body {
29
29
  .@{all-input-group}-number-body {
30
+ border-radius: 0;
31
+ border-top-right-radius: @border-radius-base;
32
+ border-bottom-right-radius: @border-radius-base;
33
+ }
34
+ & > .@{ant-prefix}-picker {
35
+ border-radius: 0;
30
36
  border-top-right-radius: @border-radius-base;
31
37
  border-bottom-right-radius: @border-radius-base;
32
38
  }
33
39
  }
34
40
  .@{all-input-group}-after-body {
35
41
  .@{all-input-group}-number-body {
42
+ border-radius: 0;
43
+ border-top-left-radius: @border-radius-base;
44
+ border-bottom-left-radius: @border-radius-base;
45
+ }
46
+ & > .@{ant-prefix}-picker {
47
+ border-radius: 0;
36
48
  border-top-left-radius: @border-radius-base;
37
49
  border-bottom-left-radius: @border-radius-base;
38
50
  }