@kmkf-fe-packages/basic-components 0.19.0-alpha.4 → 0.19.0

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
@@ -7005,10 +7005,11 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7005
7005
  onChange(list);
7006
7006
  };
7007
7007
  // 手动上传模式, 一直返回false
7008
- var beforeUpload = function beforeUpload(file) {
7008
+ var beforeUpload = function beforeUpload(file, fileList) {
7009
7009
  // console.log('beforeUpload', file);
7010
7010
  var size = file.size / 1024 / 1024 < maxSize;
7011
- if (value.length >= maxCount) {
7011
+ // TODO: 批量提交的时候
7012
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
7012
7013
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
7013
7014
  return Upload.LIST_IGNORE;
7014
7015
  }
@@ -7485,9 +7486,8 @@ var IdentifyAddress = function IdentifyAddress(props) {
7485
7486
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7486
7487
  address: []
7487
7488
  };
7488
- var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
7489
- if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7490
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7489
+ if ((val === null || val === void 0 ? void 0 : val.province) && AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7490
+ params.address = [AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7491
7491
  }
7492
7492
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
7493
7493
  };
package/dist/index.js CHANGED
@@ -7016,10 +7016,11 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7016
7016
  onChange(list);
7017
7017
  };
7018
7018
  // 手动上传模式, 一直返回false
7019
- var beforeUpload = function beforeUpload(file) {
7019
+ var beforeUpload = function beforeUpload(file, fileList) {
7020
7020
  // console.log('beforeUpload', file);
7021
7021
  var size = file.size / 1024 / 1024 < maxSize;
7022
- if (value.length >= maxCount) {
7022
+ // TODO: 批量提交的时候
7023
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
7023
7024
  antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
7024
7025
  return antd.Upload.LIST_IGNORE;
7025
7026
  }
@@ -7496,9 +7497,8 @@ var IdentifyAddress = function IdentifyAddress(props) {
7496
7497
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7497
7498
  address: []
7498
7499
  };
7499
- var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
7500
- if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7501
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7500
+ if ((val === null || val === void 0 ? void 0 : val.province) && kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7501
+ params.address = [kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7502
7502
  }
7503
7503
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
7504
7504
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.19.0-alpha.4",
3
+ "version": "0.19.0",
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": "^0.18.2-alpha.0",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.19.0",
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "react-copy-to-clipboard": "^5.1.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "8557d323cbbb8a9f8592f3a5a7853d4fa00ba6bd"
64
+ "gitHead": "e3ae98a5cc26396c9632efcfac76115bebaf7fb3"
65
65
  }