@hw-component/form 1.9.72 → 1.9.73

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.
@@ -71,15 +71,17 @@ var Index = function Index(_ref) {
71
71
  wrap: wrap,
72
72
  children: checkOptions === null || checkOptions === void 0 ? void 0 : checkOptions.map(function (item) {
73
73
  var label = item.label,
74
- itemVal = item.value;
74
+ itemVal = item.value,
75
+ itemDisabled = item.disabled;
75
76
  var checked = val[itemVal];
77
+ var nDis = typeof itemDisabled === "undefined" ? disabled : itemDisabled;
76
78
  return jsx(Index$1, {
77
79
  value: checked,
78
80
  onChange: function onChange(changeVal) {
79
81
  change(itemVal, changeVal);
80
82
  },
81
83
  valueMap: valueMap,
82
- disabled: disabled,
84
+ disabled: nDis,
83
85
  children: label
84
86
  }, itemVal);
85
87
  })
@@ -74,15 +74,17 @@ var Index = function Index(_ref) {
74
74
  wrap: wrap,
75
75
  children: checkOptions === null || checkOptions === void 0 ? void 0 : checkOptions.map(function (item) {
76
76
  var label = item.label,
77
- itemVal = item.value;
77
+ itemVal = item.value,
78
+ itemDisabled = item.disabled;
78
79
  var checked = val[itemVal];
80
+ var nDis = typeof itemDisabled === "undefined" ? disabled : itemDisabled;
79
81
  return jsxRuntime.jsx(index$1.default, {
80
82
  value: checked,
81
83
  onChange: function onChange(changeVal) {
82
84
  change(itemVal, changeVal);
83
85
  },
84
86
  valueMap: valueMap,
85
- disabled: disabled,
87
+ disabled: nDis,
86
88
  children: label
87
89
  }, itemVal);
88
90
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.9.72",
3
+ "version": "1.9.73",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@ const Index = ({
20
20
  }: HCheckboxProps) => {
21
21
  const { valueCheckMap: resultValueCheckMap, fieldNames: resultFieldNames } =
22
22
  useMatchConfigProps({ fieldNames, valueCheckMap: valueMap }); //匹配全局
23
- const checkOptions = useChangeOptions({
23
+ const checkOptions:Record<string, any>[]|undefined = useChangeOptions({
24
24
  options,
25
25
  fieldNames: resultFieldNames,
26
26
  });
@@ -63,8 +63,9 @@ const Index = ({
63
63
  return (
64
64
  <Space direction={direction} wrap={wrap}>
65
65
  {checkOptions?.map((item) => {
66
- const { label, value: itemVal } = item;
66
+ const { label, value: itemVal ,disabled:itemDisabled} = item;
67
67
  const checked = val[itemVal];
68
+ const nDis=typeof itemDisabled==="undefined"?disabled:itemDisabled;
68
69
  return (
69
70
  <Checkbox
70
71
  value={checked}
@@ -73,7 +74,7 @@ const Index = ({
73
74
  change(itemVal, changeVal);
74
75
  }}
75
76
  valueMap={valueMap}
76
- disabled={disabled}
77
+ disabled={nDis}
77
78
  >
78
79
  {label}
79
80
  </Checkbox>