@kmkf-fe-packages/basic-components 0.24.0-alpha.7 → 0.24.0-beta.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/README.md +1 -1
- package/dist/index.esm.js +5 -19
- package/dist/index.js +4 -18
- package/package.json +3 -5
package/README.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData,
|
|
6
|
+
import { AddressData, BsAddressData, request as request$1, ExpressData, LogisticsAddressData, uuid } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
8
|
import { cloneDeep } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
@@ -7358,12 +7358,11 @@ function ApaasRate(props) {
|
|
|
7358
7358
|
}));
|
|
7359
7359
|
}
|
|
7360
7360
|
|
|
7361
|
-
|
|
7362
|
-
|
|
7361
|
+
AddressData.getInstance();
|
|
7362
|
+
BsAddressData.getInstance();
|
|
7363
7363
|
var Province = function Province(props) {
|
|
7364
7364
|
var _props$type = props.type,
|
|
7365
|
-
type = _props$type === void 0 ? 'workOrder' : _props$type
|
|
7366
|
-
value = props.value;
|
|
7365
|
+
type = _props$type === void 0 ? 'workOrder' : _props$type;
|
|
7367
7366
|
var _useState = useState([]),
|
|
7368
7367
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7369
7368
|
option = _useState2[0],
|
|
@@ -7378,7 +7377,7 @@ var Province = function Province(props) {
|
|
|
7378
7377
|
while (1) switch (_context.prev = _context.next) {
|
|
7379
7378
|
case 0:
|
|
7380
7379
|
num++;
|
|
7381
|
-
options = type !== 'bs' ?
|
|
7380
|
+
options = type !== 'bs' ? AddressData.getInstance().addressOptions || [] : BsAddressData.getInstance().addressOptions || [];
|
|
7382
7381
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7383
7382
|
time.current = setTimeout(function () {
|
|
7384
7383
|
initPageSource();
|
|
@@ -7395,19 +7394,6 @@ var Province = function Province(props) {
|
|
|
7395
7394
|
return _ref.apply(this, arguments);
|
|
7396
7395
|
};
|
|
7397
7396
|
}();
|
|
7398
|
-
var getBsAddress = function getBsAddress() {
|
|
7399
|
-
var data = JSON.parse(localStorage.getItem('bsAddressData') || '[]');
|
|
7400
|
-
if (data.length) {
|
|
7401
|
-
var options = toTree(data, 1);
|
|
7402
|
-
setOptions(options);
|
|
7403
|
-
}
|
|
7404
|
-
};
|
|
7405
|
-
//如果值改变地址不存在则再获取一遍
|
|
7406
|
-
useEffect(function () {
|
|
7407
|
-
if (value && type == 'bs' && !option.length) {
|
|
7408
|
-
getBsAddress();
|
|
7409
|
-
}
|
|
7410
|
-
}, [value, type, option]);
|
|
7411
7397
|
useEffect(function () {
|
|
7412
7398
|
if (!isFirst.current) {
|
|
7413
7399
|
initPageSource();
|
package/dist/index.js
CHANGED
|
@@ -7369,12 +7369,11 @@ function ApaasRate(props) {
|
|
|
7369
7369
|
}));
|
|
7370
7370
|
}
|
|
7371
7371
|
|
|
7372
|
-
|
|
7373
|
-
|
|
7372
|
+
kmkfUtils.AddressData.getInstance();
|
|
7373
|
+
kmkfUtils.BsAddressData.getInstance();
|
|
7374
7374
|
var Province = function Province(props) {
|
|
7375
7375
|
var _props$type = props.type,
|
|
7376
|
-
type = _props$type === void 0 ? 'workOrder' : _props$type
|
|
7377
|
-
value = props.value;
|
|
7376
|
+
type = _props$type === void 0 ? 'workOrder' : _props$type;
|
|
7378
7377
|
var _useState = React.useState([]),
|
|
7379
7378
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7380
7379
|
option = _useState2[0],
|
|
@@ -7389,7 +7388,7 @@ var Province = function Province(props) {
|
|
|
7389
7388
|
while (1) switch (_context.prev = _context.next) {
|
|
7390
7389
|
case 0:
|
|
7391
7390
|
num++;
|
|
7392
|
-
options = type !== 'bs' ?
|
|
7391
|
+
options = type !== 'bs' ? kmkfUtils.AddressData.getInstance().addressOptions || [] : kmkfUtils.BsAddressData.getInstance().addressOptions || [];
|
|
7393
7392
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7394
7393
|
time.current = setTimeout(function () {
|
|
7395
7394
|
initPageSource();
|
|
@@ -7406,19 +7405,6 @@ var Province = function Province(props) {
|
|
|
7406
7405
|
return _ref.apply(this, arguments);
|
|
7407
7406
|
};
|
|
7408
7407
|
}();
|
|
7409
|
-
var getBsAddress = function getBsAddress() {
|
|
7410
|
-
var data = JSON.parse(localStorage.getItem('bsAddressData') || '[]');
|
|
7411
|
-
if (data.length) {
|
|
7412
|
-
var options = kmkfUtils.toTree(data, 1);
|
|
7413
|
-
setOptions(options);
|
|
7414
|
-
}
|
|
7415
|
-
};
|
|
7416
|
-
//如果值改变地址不存在则再获取一遍
|
|
7417
|
-
React.useEffect(function () {
|
|
7418
|
-
if (value && type == 'bs' && !option.length) {
|
|
7419
|
-
getBsAddress();
|
|
7420
|
-
}
|
|
7421
|
-
}, [value, type, option]);
|
|
7422
7408
|
React.useEffect(function () {
|
|
7423
7409
|
if (!isFirst.current) {
|
|
7424
7410
|
initPageSource();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.24.0-
|
|
3
|
+
"version": "0.24.0-beta.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,9 +20,8 @@
|
|
|
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.24.0-
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.24.0-beta.0",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
|
-
"kmkf-monitor": "^0.8.8",
|
|
26
25
|
"lodash": "^4.17.21",
|
|
27
26
|
"pubsub-js": "^1.9.4",
|
|
28
27
|
"react-copy-to-clipboard": "^5.1.0",
|
|
@@ -47,7 +46,6 @@
|
|
|
47
46
|
"identity-obj-proxy": "^3.0.0",
|
|
48
47
|
"jest": "^29.5.0",
|
|
49
48
|
"jest-environment-jsdom": "^29.5.0",
|
|
50
|
-
"kmkf-monitor": "^0.8.8",
|
|
51
49
|
"lint-staged": "^10.0.7",
|
|
52
50
|
"lodash": "^4.17.21",
|
|
53
51
|
"prettier": "^2.2.1",
|
|
@@ -64,5 +62,5 @@
|
|
|
64
62
|
"publishConfig": {
|
|
65
63
|
"access": "public"
|
|
66
64
|
},
|
|
67
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "655c1bdd4242ded0a5260bf5ec18666262c340e1"
|
|
68
66
|
}
|