@hw-component/form 1.5.8 → 1.6.1

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.
@@ -15,7 +15,7 @@ import { Input, Button } from 'antd';
15
15
  import { useRequest } from 'ahooks';
16
16
 
17
17
  var _excluded = ["buttonProps", "value", "onChange", "children", "request"],
18
- _excluded2 = ["onClick", "type", "loading"];
18
+ _excluded2 = ["onClick", "type", "ghost", "loading"];
19
19
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
21
  var Index = function Index(_ref) {
@@ -29,6 +29,8 @@ var Index = function Index(_ref) {
29
29
  var onClick = buttonProps.onClick,
30
30
  _buttonProps$type = buttonProps.type,
31
31
  type = _buttonProps$type === void 0 ? "primary" : _buttonProps$type,
32
+ _buttonProps$ghost = buttonProps.ghost,
33
+ ghost = _buttonProps$ghost === void 0 ? true : _buttonProps$ghost,
32
34
  btnLoading = buttonProps.loading,
33
35
  oProps = _objectWithoutProperties(buttonProps, _excluded2);
34
36
  var _useRequest = useRequest(function (val) {
@@ -79,13 +81,16 @@ var Index = function Index(_ref) {
79
81
  },
80
82
  value: value,
81
83
  onChange: change
82
- })), jsx(Button, _objectSpread(_objectSpread({}, oProps), {}, {
84
+ })), jsx(Button, _objectSpread(_objectSpread({
83
85
  type: type,
84
86
  onClick: click,
85
87
  loading: loading || btnLoading,
86
88
  style: {
87
- marginLeft: 4
89
+ marginLeft: 8,
90
+ borderRadius: 4
88
91
  },
92
+ ghost: ghost
93
+ }, oProps), {}, {
89
94
  children: children
90
95
  }))]
91
96
  });
@@ -18,7 +18,7 @@ var antd = require('antd');
18
18
  var ahooks = require('ahooks');
19
19
 
20
20
  var _excluded = ["buttonProps", "value", "onChange", "children", "request"],
21
- _excluded2 = ["onClick", "type", "loading"];
21
+ _excluded2 = ["onClick", "type", "ghost", "loading"];
22
22
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
23
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
24
  var Index = function Index(_ref) {
@@ -32,6 +32,8 @@ var Index = function Index(_ref) {
32
32
  var onClick = buttonProps.onClick,
33
33
  _buttonProps$type = buttonProps.type,
34
34
  type = _buttonProps$type === void 0 ? "primary" : _buttonProps$type,
35
+ _buttonProps$ghost = buttonProps.ghost,
36
+ ghost = _buttonProps$ghost === void 0 ? true : _buttonProps$ghost,
35
37
  btnLoading = buttonProps.loading,
36
38
  oProps = _objectWithoutProperties(buttonProps, _excluded2);
37
39
  var _useRequest = ahooks.useRequest(function (val) {
@@ -82,13 +84,16 @@ var Index = function Index(_ref) {
82
84
  },
83
85
  value: value,
84
86
  onChange: change
85
- })), jsxRuntime.jsx(antd.Button, _objectSpread(_objectSpread({}, oProps), {}, {
87
+ })), jsxRuntime.jsx(antd.Button, _objectSpread(_objectSpread({
86
88
  type: type,
87
89
  onClick: click,
88
90
  loading: loading || btnLoading,
89
91
  style: {
90
- marginLeft: 4
92
+ marginLeft: 8,
93
+ borderRadius: 4
91
94
  },
95
+ ghost: ghost
96
+ }, oProps), {}, {
92
97
  children: children
93
98
  }))]
94
99
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.5.8",
3
+ "version": "1.6.1",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,6 +14,7 @@ const Index: React.FC<HButtonInputProps> = ({
14
14
  const {
15
15
  onClick,
16
16
  type = "primary",
17
+ ghost=true,
17
18
  loading: btnLoading,
18
19
  ...oProps
19
20
  } = buttonProps;
@@ -38,11 +39,12 @@ const Index: React.FC<HButtonInputProps> = ({
38
39
  <Input.Group compact style={{ display: "flex" }}>
39
40
  <Input {...props} style={{ flex: 1 }} value={value} onChange={change} />
40
41
  <Button
41
- {...oProps}
42
42
  type={type}
43
43
  onClick={click}
44
44
  loading={loading || btnLoading}
45
- style={{ marginLeft: 4 }}
45
+ style={{ marginLeft: 8,borderRadius:4 }}
46
+ ghost={ghost}
47
+ {...oProps}
46
48
  >
47
49
  {children}
48
50
  </Button>