@hw-component/form 1.9.17 → 1.9.19

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.
@@ -58,7 +58,6 @@ var useInfoReq = function useInfoReq(_ref) {
58
58
  var infoControl = useRequest(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
59
59
  var reqParams,
60
60
  result,
61
- setValue,
62
61
  _args2 = arguments;
63
62
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
64
63
  while (1) switch (_context2.prev = _context2.next) {
@@ -76,10 +75,15 @@ var useInfoReq = function useInfoReq(_ref) {
76
75
  form === null || form === void 0 || form.setFieldsValue(result);
77
76
  return _context2.abrupt("return", result || {});
78
77
  case 8:
79
- setValue = initialValues || {};
80
- form === null || form === void 0 || form.setFieldsValue(setValue);
81
- return _context2.abrupt("return", setValue);
82
- case 11:
78
+ if (!(typeof initialValues === "undefined")) {
79
+ _context2.next = 10;
80
+ break;
81
+ }
82
+ return _context2.abrupt("return", {});
83
+ case 10:
84
+ form === null || form === void 0 || form.setFieldsValue(initialValues);
85
+ return _context2.abrupt("return", initialValues);
86
+ case 12:
83
87
  case "end":
84
88
  return _context2.stop();
85
89
  }
package/es/index.css CHANGED
@@ -63,7 +63,10 @@
63
63
  height: auto;
64
64
  }
65
65
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-hw-form-label-item {
66
- text-align: right;
66
+ -webkit-box-pack: end;
67
+ -webkit-justify-content: end;
68
+ -ms-flex-pack: end;
69
+ justify-content: end;
67
70
  display: -webkit-box;
68
71
  display: -webkit-flex;
69
72
  display: -ms-flexbox;
@@ -59,7 +59,6 @@ var useInfoReq = function useInfoReq(_ref) {
59
59
  var infoControl = ahooks.useRequest(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
60
60
  var reqParams,
61
61
  result,
62
- setValue,
63
62
  _args2 = arguments;
64
63
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
65
64
  while (1) switch (_context2.prev = _context2.next) {
@@ -77,10 +76,15 @@ var useInfoReq = function useInfoReq(_ref) {
77
76
  form === null || form === void 0 || form.setFieldsValue(result);
78
77
  return _context2.abrupt("return", result || {});
79
78
  case 8:
80
- setValue = initialValues || {};
81
- form === null || form === void 0 || form.setFieldsValue(setValue);
82
- return _context2.abrupt("return", setValue);
83
- case 11:
79
+ if (!(typeof initialValues === "undefined")) {
80
+ _context2.next = 10;
81
+ break;
82
+ }
83
+ return _context2.abrupt("return", {});
84
+ case 10:
85
+ form === null || form === void 0 || form.setFieldsValue(initialValues);
86
+ return _context2.abrupt("return", initialValues);
87
+ case 12:
84
88
  case "end":
85
89
  return _context2.stop();
86
90
  }
package/lib/index.css CHANGED
@@ -63,7 +63,10 @@
63
63
  height: auto;
64
64
  }
65
65
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-hw-form-label-item {
66
- text-align: right;
66
+ -webkit-box-pack: end;
67
+ -webkit-justify-content: end;
68
+ -ms-flex-pack: end;
69
+ justify-content: end;
67
70
  display: -webkit-box;
68
71
  display: -webkit-flex;
69
72
  display: -ms-flexbox;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.9.17",
3
+ "version": "1.9.19",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,6 +17,7 @@ export const useModifyProps = ({
17
17
  title,
18
18
  onCancel,
19
19
  autoClear,
20
+
20
21
  }: ModifyPropsModal) => {
21
22
  const [modalVisible, setModalVisible] = useState(visible);
22
23
  const [modalFormData, setModalFormData] = useState(configData);
@@ -51,9 +51,11 @@ export const useInfoReq = ({
51
51
  form?.setFieldsValue(result);
52
52
  return result || {};
53
53
  }
54
- const setValue = initialValues || {};
55
- form?.setFieldsValue(setValue);
56
- return setValue;
54
+ if (typeof initialValues==="undefined"){
55
+ return {};
56
+ }
57
+ form?.setFieldsValue(initialValues);
58
+ return initialValues;
57
59
  });
58
60
  const { run, mutate } = infoControl;
59
61
  useEffect(() => {
@@ -47,7 +47,7 @@
47
47
  }
48
48
  .@{ant-prefix}-hw-form-base-item-right > .@{ant-prefix}-form-item-label {
49
49
  .@{ant-prefix}-hw-form-label-item {
50
- text-align: right;
50
+ justify-content: end;
51
51
  display: flex;
52
52
  align-items: center;
53
53
  }