@hw-component/form 1.3.6 → 1.3.7

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.
@@ -28,7 +28,8 @@ var Index = function Index(_ref) {
28
28
  _ref$keyInValue = _ref.keyInValue,
29
29
  keyInValue = _ref$keyInValue === void 0 ? true : _ref$keyInValue,
30
30
  addFormat = _ref.addFormat,
31
- direction = _ref.direction;
31
+ direction = _ref.direction,
32
+ wrap = _ref.wrap;
32
33
  var _useMatchConfigProps = useMatchConfigProps({
33
34
  fieldNames: fieldNames,
34
35
  valueCheckMap: valueMap
@@ -76,6 +77,7 @@ var Index = function Index(_ref) {
76
77
  });
77
78
  return jsx(Space, {
78
79
  direction: direction,
80
+ wrap: wrap,
79
81
  children: checkOptions === null || checkOptions === void 0 ? void 0 : checkOptions.map(function (item) {
80
82
  var label = item.label,
81
83
  itemVal = item.value;
@@ -12,4 +12,5 @@ export interface HCheckboxProps extends Omit<CheckboxProps, "value" | "onChange"
12
12
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
13
13
  subParams?: (formatValue: Record<string, any>, sourceValue: any[]) => any;
14
14
  direction?: "horizontal" | "vertical";
15
+ wrap?: boolean;
15
16
  }
@@ -31,7 +31,8 @@ var Index = function Index(_ref) {
31
31
  _ref$keyInValue = _ref.keyInValue,
32
32
  keyInValue = _ref$keyInValue === void 0 ? true : _ref$keyInValue,
33
33
  addFormat = _ref.addFormat,
34
- direction = _ref.direction;
34
+ direction = _ref.direction,
35
+ wrap = _ref.wrap;
35
36
  var _useMatchConfigProps = index.useMatchConfigProps({
36
37
  fieldNames: fieldNames,
37
38
  valueCheckMap: valueMap
@@ -79,6 +80,7 @@ var Index = function Index(_ref) {
79
80
  });
80
81
  return jsxRuntime.jsx(antd.Space, {
81
82
  direction: direction,
83
+ wrap: wrap,
82
84
  children: checkOptions === null || checkOptions === void 0 ? void 0 : checkOptions.map(function (item) {
83
85
  var label = item.label,
84
86
  itemVal = item.value;
@@ -12,4 +12,5 @@ export interface HCheckboxProps extends Omit<CheckboxProps, "value" | "onChange"
12
12
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
13
13
  subParams?: (formatValue: Record<string, any>, sourceValue: any[]) => any;
14
14
  direction?: "horizontal" | "vertical";
15
+ wrap?: boolean;
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,6 +16,7 @@ const Index = ({
16
16
  keyInValue = true,
17
17
  addFormat,
18
18
  direction,
19
+ wrap
19
20
  }: HCheckboxProps) => {
20
21
  const { valueCheckMap: resultValueCheckMap, fieldNames: resultFieldNames } =
21
22
  useMatchConfigProps({ fieldNames, valueCheckMap: valueMap }); //匹配全局
@@ -60,7 +61,7 @@ const Index = ({
60
61
  },
61
62
  });
62
63
  return (
63
- <Space direction={direction}>
64
+ <Space direction={direction} wrap={wrap}>
64
65
  {checkOptions?.map((item) => {
65
66
  const { label, value: itemVal } = item;
66
67
  const checked = val[itemVal];
@@ -14,4 +14,5 @@ export interface HCheckboxProps
14
14
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
15
15
  subParams?: (formatValue: Record<string, any>, sourceValue: any[]) => any;
16
16
  direction?: "horizontal" | "vertical";
17
+ wrap?:boolean;
17
18
  }