@hw-component/form 1.3.5 → 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.
- package/es/CheckboxGroup/index.js +3 -1
- package/es/CheckboxGroup/modal.d.ts +1 -0
- package/es/Upload/Preview/index.js +1 -0
- package/lib/CheckboxGroup/index.js +3 -1
- package/lib/CheckboxGroup/modal.d.ts +1 -0
- package/lib/Upload/Preview/index.js +1 -0
- package/package.json +1 -1
- package/src/components/CheckboxGroup/index.tsx +2 -1
- package/src/components/CheckboxGroup/modal.ts +1 -0
- package/src/components/Upload/Preview/index.tsx +1 -1
|
@@ -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
|
@@ -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];
|
|
@@ -7,7 +7,7 @@ export type IPreviewProps = IMediaTypeEleProps & ModalProps;
|
|
|
7
7
|
|
|
8
8
|
export default ({ visible, file, onCancel }: IPreviewProps) => {
|
|
9
9
|
return (
|
|
10
|
-
<Modal footer={null} visible={visible} title="预览" onCancel={onCancel}>
|
|
10
|
+
<Modal footer={null} visible={visible} title="预览" onCancel={onCancel} destroyOnClose>
|
|
11
11
|
<MediaTypeEle file={file} />
|
|
12
12
|
</Modal>
|
|
13
13
|
);
|