@kmkf-fe-packages/basic-components 2.2.3 → 2.2.5

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
@@ -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
  })]));
@@ -22564,8 +22568,13 @@ var IdInputSelect = function IdInputSelect(props) {
22564
22568
  }));
22565
22569
  }))));
22566
22570
  };
22567
- var handleChange = function handleChange(val) {
22568
- onChange === null || onChange === void 0 ? void 0 : onChange(val);
22571
+ var handleChange = function handleChange(val, isInput) {
22572
+ console.log('handleChange---', {
22573
+ val: val,
22574
+ value: value,
22575
+ isInput: isInput
22576
+ });
22577
+ onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && !!isInput);
22569
22578
  // 关闭浮窗
22570
22579
  setPopoverVisible(false);
22571
22580
  };
@@ -22576,7 +22585,7 @@ var IdInputSelect = function IdInputSelect(props) {
22576
22585
  disabled: disabled,
22577
22586
  value: inputValue,
22578
22587
  onBlur: function onBlur(e) {
22579
- handleChange(e.target.value);
22588
+ handleChange(e.target.value, true);
22580
22589
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
22581
22590
  },
22582
22591
  onChange: function onChange(e) {
package/dist/index.js CHANGED
@@ -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
  })]));
@@ -22576,8 +22580,13 @@ var IdInputSelect = function IdInputSelect(props) {
22576
22580
  }));
22577
22581
  }))));
22578
22582
  };
22579
- var handleChange = function handleChange(val) {
22580
- onChange === null || onChange === void 0 ? void 0 : onChange(val);
22583
+ var handleChange = function handleChange(val, isInput) {
22584
+ console.log('handleChange---', {
22585
+ val: val,
22586
+ value: value,
22587
+ isInput: isInput
22588
+ });
22589
+ onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && !!isInput);
22581
22590
  // 关闭浮窗
22582
22591
  setPopoverVisible(false);
22583
22592
  };
@@ -22588,7 +22597,7 @@ var IdInputSelect = function IdInputSelect(props) {
22588
22597
  disabled: disabled,
22589
22598
  value: inputValue,
22590
22599
  onBlur: function onBlur(e) {
22591
- handleChange(e.target.value);
22600
+ handleChange(e.target.value, true);
22592
22601
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
22593
22602
  },
22594
22603
  onChange: function onChange(e) {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { FormInstance } from 'antd';
3
3
  interface IdInputSelectProps {
4
4
  value?: string;
5
- onChange?: (value: any) => void;
5
+ onChange?: (value: any, isChange: boolean) => void;
6
6
  onBlur?: (value: any) => void;
7
7
  disabled?: boolean;
8
8
  form: FormInstance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
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.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.2.5",
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": "48d5bd6efb74f49f619bbf822d3530954bcf4801"
68
+ "gitHead": "86abfb051d82fe402c84e33515c15b7c038c4c3c"
69
69
  }