@hw-component/form 0.0.2-beta-v4 → 0.0.2-beta-v6

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.
@@ -19,7 +19,10 @@ var UpFormItem = (function (_ref) {
19
19
  });
20
20
  return /*#__PURE__*/React.createElement(Item, {
21
21
  shouldUpdate: resultShouldUpdate,
22
- dependencies: dependencies
22
+ dependencies: dependencies,
23
+ wrapperCol: {
24
+ span: 24
25
+ }
23
26
  }, function () {
24
27
  return /*#__PURE__*/React.createElement(Index, _extends({
25
28
  hide: hide
@@ -32,7 +32,7 @@ var Index = function Index(_ref) {
32
32
  onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
33
33
  };
34
34
  var click = /*#__PURE__*/function () {
35
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(e) {
35
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
36
36
  var result;
37
37
  return _regeneratorRuntime.wrap(function _callee$(_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
@@ -47,14 +47,14 @@ var Index = function Index(_ref) {
47
47
  case 4:
48
48
  result = _context.sent;
49
49
  case 5:
50
- onClick === null || onClick === void 0 ? void 0 : onClick(result, e);
50
+ onClick === null || onClick === void 0 ? void 0 : onClick(result, onChange);
51
51
  case 6:
52
52
  case "end":
53
53
  return _context.stop();
54
54
  }
55
55
  }, _callee);
56
56
  }));
57
- return function click(_x) {
57
+ return function click() {
58
58
  return _ref2.apply(this, arguments);
59
59
  };
60
60
  }();
@@ -18,7 +18,7 @@ export interface HSelectInputProps extends Omit<HInputProps, "value" | "onChange
18
18
  addDispatchListener?: AddDispatchListenerFn;
19
19
  }
20
20
  export interface HButtonProps extends Omit<ButtonProps, "onClick"> {
21
- onClick: (value: string | readonly string[] | number | undefined, e: HTMLElement) => void;
21
+ onClick: (value: string | readonly string[] | number | undefined, onChange?: (val: any) => void) => void;
22
22
  }
23
23
  export interface HButtonInputProps extends HInputProps {
24
24
  buttonProps?: HButtonProps;
@@ -22,7 +22,10 @@ var UpFormItem = (function (_ref) {
22
22
  });
23
23
  return /*#__PURE__*/React.createElement(Item, {
24
24
  shouldUpdate: resultShouldUpdate,
25
- dependencies: dependencies
25
+ dependencies: dependencies,
26
+ wrapperCol: {
27
+ span: 24
28
+ }
26
29
  }, function () {
27
30
  return /*#__PURE__*/React.createElement(BasicItem.default, _extends({
28
31
  hide: hide
@@ -35,7 +35,7 @@ var Index = function Index(_ref) {
35
35
  onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
36
36
  };
37
37
  var click = /*#__PURE__*/function () {
38
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(e) {
38
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
39
  var result;
40
40
  return _regeneratorRuntime.wrap(function _callee$(_context) {
41
41
  while (1) switch (_context.prev = _context.next) {
@@ -50,14 +50,14 @@ var Index = function Index(_ref) {
50
50
  case 4:
51
51
  result = _context.sent;
52
52
  case 5:
53
- onClick === null || onClick === void 0 ? void 0 : onClick(result, e);
53
+ onClick === null || onClick === void 0 ? void 0 : onClick(result, onChange);
54
54
  case 6:
55
55
  case "end":
56
56
  return _context.stop();
57
57
  }
58
58
  }, _callee);
59
59
  }));
60
- return function click(_x) {
60
+ return function click() {
61
61
  return _ref2.apply(this, arguments);
62
62
  };
63
63
  }();
@@ -18,7 +18,7 @@ export interface HSelectInputProps extends Omit<HInputProps, "value" | "onChange
18
18
  addDispatchListener?: AddDispatchListenerFn;
19
19
  }
20
20
  export interface HButtonProps extends Omit<ButtonProps, "onClick"> {
21
- onClick: (value: string | readonly string[] | number | undefined, e: HTMLElement) => void;
21
+ onClick: (value: string | readonly string[] | number | undefined, onChange?: (val: any) => void) => void;
22
22
  }
23
23
  export interface HButtonInputProps extends HInputProps {
24
24
  buttonProps?: HButtonProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "0.0.2-beta-v4",
3
+ "version": "0.0.2-beta-v6",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@ export default ({
11
11
  }: FormItemWithRender) => {
12
12
  const resultShouldUpdate = useShouldUpdate({ shouldUpdate, hide });
13
13
  return (
14
- <Item shouldUpdate={resultShouldUpdate} dependencies={dependencies}>
14
+ <Item shouldUpdate={resultShouldUpdate} dependencies={dependencies} wrapperCol={{span:24}}>
15
15
  {() => {
16
16
  return <BasicItem hide={hide} {...props} />;
17
17
  }}
@@ -21,12 +21,12 @@ const Index: React.FC<HButtonInputProps> = ({
21
21
  const change = (e) => {
22
22
  onChange?.(e.target.value);
23
23
  };
24
- const click = async (e) => {
24
+ const click = async () => {
25
25
  let result = value;
26
26
  if (request) {
27
27
  result = await run(value);
28
28
  }
29
- onClick?.(result, e);
29
+ onClick?.(result, onChange);
30
30
  };
31
31
 
32
32
  return (
@@ -24,7 +24,7 @@ export interface HSelectInputProps
24
24
  export interface HButtonProps extends Omit<ButtonProps, "onClick"> {
25
25
  onClick: (
26
26
  value: string | readonly string[] | number | undefined,
27
- e: HTMLElement
27
+ onChange?:(val:any)=>void
28
28
  ) => void;
29
29
  }
30
30
  export interface HButtonInputProps extends HInputProps {