@kmkf-fe-packages/basic-components 2.2.8 → 2.2.10

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/dist/index.esm.js CHANGED
@@ -8152,7 +8152,7 @@ var SubForm = function SubForm(props) {
8152
8152
  title: '序号',
8153
8153
  width: 50,
8154
8154
  render: function render(val, record, index) {
8155
- return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
8155
+ return disabled ? /*#__PURE__*/React.createElement("div", null, index + 1) : /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
8156
8156
  index: index,
8157
8157
  hoveredRowIndex: hoveredRowIndex,
8158
8158
  handleClick: function handleClick() {
@@ -8417,6 +8417,10 @@ var SubForm = function SubForm(props) {
8417
8417
  }
8418
8418
  });
8419
8419
  }
8420
+ if (maxCount && (value === null || value === void 0 ? void 0 : value.length) >= maxCount) {
8421
+ message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
8422
+ return;
8423
+ }
8420
8424
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8421
8425
  uuid: uuid()
8422
8426
  })]));
@@ -19572,7 +19576,7 @@ var OrderSubForm = function OrderSubForm(props) {
19572
19576
  width: 80,
19573
19577
  ellipsis: true,
19574
19578
  render: function render(val, record, index) {
19575
- return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
19579
+ return disabled ? /*#__PURE__*/React.createElement("div", null, index + 1) : /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
19576
19580
  index: index,
19577
19581
  hoveredRowIndex: hoveredRowIndex,
19578
19582
  handleClick: function handleClick() {
@@ -19635,8 +19639,7 @@ var OrderSubForm = function OrderSubForm(props) {
19635
19639
  });
19636
19640
  }
19637
19641
  return list;
19638
- }, [newTableHeader, disabled, updateHandle]);
19639
- console.log('column', column);
19642
+ }, [newTableHeader, disabled, updateHandle, hoveredRowIndex]);
19640
19643
  var orderModalColumns = useMemo(function () {
19641
19644
  return [{
19642
19645
  dataIndex: '',
package/dist/index.js CHANGED
@@ -8164,7 +8164,7 @@ var SubForm = function SubForm(props) {
8164
8164
  title: '序号',
8165
8165
  width: 50,
8166
8166
  render: function render(val, record, index) {
8167
- return /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
8167
+ return disabled ? /*#__PURE__*/React__default['default'].createElement("div", null, index + 1) : /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
8168
8168
  index: index,
8169
8169
  hoveredRowIndex: hoveredRowIndex,
8170
8170
  handleClick: function handleClick() {
@@ -8429,6 +8429,10 @@ var SubForm = function SubForm(props) {
8429
8429
  }
8430
8430
  });
8431
8431
  }
8432
+ if (maxCount && (value === null || value === void 0 ? void 0 : value.length) >= maxCount) {
8433
+ antd.message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
8434
+ return;
8435
+ }
8432
8436
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8433
8437
  uuid: kmkfUtils.uuid()
8434
8438
  })]));
@@ -19584,7 +19588,7 @@ var OrderSubForm = function OrderSubForm(props) {
19584
19588
  width: 80,
19585
19589
  ellipsis: true,
19586
19590
  render: function render(val, record, index) {
19587
- return /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
19591
+ return disabled ? /*#__PURE__*/React__default['default'].createElement("div", null, index + 1) : /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
19588
19592
  index: index,
19589
19593
  hoveredRowIndex: hoveredRowIndex,
19590
19594
  handleClick: function handleClick() {
@@ -19647,8 +19651,7 @@ var OrderSubForm = function OrderSubForm(props) {
19647
19651
  });
19648
19652
  }
19649
19653
  return list;
19650
- }, [newTableHeader, disabled, updateHandle]);
19651
- console.log('column', column);
19654
+ }, [newTableHeader, disabled, updateHandle, hoveredRowIndex]);
19652
19655
  var orderModalColumns = React.useMemo(function () {
19653
19656
  return [{
19654
19657
  dataIndex: '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.2.8",
3
+ "version": "2.2.10",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "2.2.8",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.2.10",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.9",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "6d34dee3686d97ca3ab0bdd46311f8299da96ba7"
68
+ "gitHead": "83e9ea0698aeb5557e811db03dce4299dc67981a"
69
69
  }