@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.
- package/es/Form/FormItem/UpFormItem.js +4 -1
- package/es/Input/ButtonInput.js +3 -3
- package/es/Input/modal.d.ts +1 -1
- package/lib/Form/FormItem/UpFormItem.js +4 -1
- package/lib/Input/ButtonInput.js +3 -3
- package/lib/Input/modal.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Form/FormItem/UpFormItem.tsx +1 -1
- package/src/components/Input/ButtonInput.tsx +2 -2
- package/src/components/Input/modal.ts +1 -1
|
@@ -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
|
package/es/Input/ButtonInput.js
CHANGED
|
@@ -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(
|
|
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,
|
|
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(
|
|
57
|
+
return function click() {
|
|
58
58
|
return _ref2.apply(this, arguments);
|
|
59
59
|
};
|
|
60
60
|
}();
|
package/es/Input/modal.d.ts
CHANGED
|
@@ -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,
|
|
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
|
package/lib/Input/ButtonInput.js
CHANGED
|
@@ -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(
|
|
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,
|
|
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(
|
|
60
|
+
return function click() {
|
|
61
61
|
return _ref2.apply(this, arguments);
|
|
62
62
|
};
|
|
63
63
|
}();
|
package/lib/Input/modal.d.ts
CHANGED
|
@@ -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,
|
|
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
|
@@ -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 (
|
|
24
|
+
const click = async () => {
|
|
25
25
|
let result = value;
|
|
26
26
|
if (request) {
|
|
27
27
|
result = await run(value);
|
|
28
28
|
}
|
|
29
|
-
onClick?.(result,
|
|
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
|
-
|
|
27
|
+
onChange?:(val:any)=>void
|
|
28
28
|
) => void;
|
|
29
29
|
}
|
|
30
30
|
export interface HButtonInputProps extends HInputProps {
|