@kmkf-fe-packages/basic-components 0.7.15-alpha.71 → 0.7.15-alpha.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.
- package/dist/index.esm.js +2 -56
- package/dist/index.js +2 -56
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -10166,7 +10166,6 @@ var BsGoods = function BsGoods(props) {
|
|
|
10166
10166
|
useEffect(function () {
|
|
10167
10167
|
valueRef.current = value;
|
|
10168
10168
|
pubsub.subscribe('type', function (type, data) {
|
|
10169
|
-
console.log(type, data);
|
|
10170
10169
|
if (disabled) return;
|
|
10171
10170
|
withInfo.current = {
|
|
10172
10171
|
type: type,
|
|
@@ -10192,18 +10191,12 @@ var BsGoods = function BsGoods(props) {
|
|
|
10192
10191
|
if (['1', '3'].includes(data.val)) {
|
|
10193
10192
|
var _valueRef$current2;
|
|
10194
10193
|
pubsub.publish('reissueSelectListReturn', {
|
|
10195
|
-
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || [])
|
|
10194
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
|
|
10195
|
+
newValue: data === null || data === void 0 ? void 0 : data.newValue
|
|
10196
10196
|
});
|
|
10197
10197
|
}
|
|
10198
10198
|
});
|
|
10199
10199
|
}, [disabled, value]);
|
|
10200
|
-
// useEffect(() => {
|
|
10201
|
-
// if (!disabled) {
|
|
10202
|
-
// pubsub.publish('goodList', {
|
|
10203
|
-
// list: cloneDeep(value?.bsGoods || []),
|
|
10204
|
-
// });
|
|
10205
|
-
// }
|
|
10206
|
-
// }, [value, disabled]);
|
|
10207
10200
|
var _onSelect = function onSelect(list) {
|
|
10208
10201
|
var _withInfo$current, _withInfo$current2;
|
|
10209
10202
|
if (disabled) return;
|
|
@@ -10256,16 +10249,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10256
10249
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
10257
10250
|
disabled = props.disabled,
|
|
10258
10251
|
other = _objectWithoutProperties(props, _excluded$b);
|
|
10259
|
-
var _useState = useState([]),
|
|
10260
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10261
|
-
bsGoods = _useState2[0],
|
|
10262
|
-
setBsGoods = _useState2[1];
|
|
10263
10252
|
var valueRef = useRef({});
|
|
10264
|
-
// useEffect(() => {
|
|
10265
|
-
// pubsub.subscribe('goodList', (_: any, data: any) => {
|
|
10266
|
-
// setBsGoods(data.list);
|
|
10267
|
-
// });
|
|
10268
|
-
// }, []);
|
|
10269
10253
|
useEffect(function () {
|
|
10270
10254
|
valueRef.current = value;
|
|
10271
10255
|
pubsub.subscribeOnce('deleteGood', function (_, data) {
|
|
@@ -10288,21 +10272,10 @@ var BsExchange = function BsExchange(props) {
|
|
|
10288
10272
|
onChange(newValue);
|
|
10289
10273
|
}
|
|
10290
10274
|
});
|
|
10291
|
-
// pubsub.subscribeOnce('selectList', (_: any, data: any) => {
|
|
10292
|
-
// if (disabled) return;
|
|
10293
|
-
// if (value) {
|
|
10294
|
-
// const newData = cloneDeep(data);
|
|
10295
|
-
// onChange({
|
|
10296
|
-
// ...value,
|
|
10297
|
-
// bsExchangeReturnGoods: getListHandle([...newData.list], value),
|
|
10298
|
-
// });
|
|
10299
|
-
// }
|
|
10300
|
-
// });
|
|
10301
10275
|
}, [value]);
|
|
10302
10276
|
useEffect(function () {
|
|
10303
10277
|
pubsub.subscribe('selectList', function (_, data) {
|
|
10304
10278
|
if (disabled) return;
|
|
10305
|
-
console.log('selectList', valueRef.current, data);
|
|
10306
10279
|
if (valueRef.current) {
|
|
10307
10280
|
var newDataList = cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
|
|
10308
10281
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
|
|
@@ -10374,9 +10347,6 @@ var BsExchange = function BsExchange(props) {
|
|
|
10374
10347
|
newValue.bsExchangeType = val;
|
|
10375
10348
|
newValue.bsExchangeReturnGoods = [];
|
|
10376
10349
|
newValue.bsExchangeGiftGoods = [];
|
|
10377
|
-
// if (['1', '3'].includes(val[0])) {
|
|
10378
|
-
// newValue.bsExchangeReturnGoods = getListHandle(bsGoods, newValue);
|
|
10379
|
-
// }
|
|
10380
10350
|
if (['2', '4'].includes(val[0])) {
|
|
10381
10351
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10382
10352
|
}
|
|
@@ -10396,12 +10366,10 @@ var BsExchange = function BsExchange(props) {
|
|
|
10396
10366
|
newValue[key] = val;
|
|
10397
10367
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10398
10368
|
if (key === 'bsExchangeType') {
|
|
10399
|
-
console.log(val);
|
|
10400
10369
|
pubsub.publish('type', val[0]);
|
|
10401
10370
|
}
|
|
10402
10371
|
};
|
|
10403
10372
|
var changeReturnHandle = function changeReturnHandle(val, index, key) {
|
|
10404
|
-
console.log('changeReturnHandle', val, index, key);
|
|
10405
10373
|
var newValue = _objectSpread2({}, value);
|
|
10406
10374
|
newValue.bsExchangeReturnGoods[index][key] = (val || []).map(function (t) {
|
|
10407
10375
|
t.index = index;
|
|
@@ -10503,16 +10471,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10503
10471
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
10504
10472
|
disabled = props.disabled,
|
|
10505
10473
|
other = _objectWithoutProperties(props, _excluded$c);
|
|
10506
|
-
var _useState = useState([]),
|
|
10507
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10508
|
-
bsGoods = _useState2[0],
|
|
10509
|
-
setBsGoods = _useState2[1];
|
|
10510
10474
|
var valueRef = useRef({});
|
|
10511
|
-
// useEffect(() => {
|
|
10512
|
-
// pubsub.subscribe('goodList', (_: any, data: any) => {
|
|
10513
|
-
// setBsGoods(data.list);
|
|
10514
|
-
// });
|
|
10515
|
-
// }, []);
|
|
10516
10475
|
useEffect(function () {
|
|
10517
10476
|
pubsub.subscribe('reissueSelectList', function (_, data) {
|
|
10518
10477
|
if (disabled) return;
|
|
@@ -10553,19 +10512,6 @@ var BsReissue = function BsReissue(props) {
|
|
|
10553
10512
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10554
10513
|
}
|
|
10555
10514
|
});
|
|
10556
|
-
// pubsub.subscribeOnce('reissueSelectList', (_: any, data: any) => {
|
|
10557
|
-
// if (disabled) return;
|
|
10558
|
-
// if (value) {
|
|
10559
|
-
// const newValue = { ...value };
|
|
10560
|
-
// newValue.bsReissueGoods = data?.list.map((item: any) => {
|
|
10561
|
-
// item.money = 0;
|
|
10562
|
-
// item.share = 0;
|
|
10563
|
-
// item.canUpdateNumber = true;
|
|
10564
|
-
// return item;
|
|
10565
|
-
// });
|
|
10566
|
-
// onChange?.(newValue);
|
|
10567
|
-
// }
|
|
10568
|
-
// });
|
|
10569
10515
|
}, [value, disabled]);
|
|
10570
10516
|
var changeHandle = function changeHandle(val, key) {
|
|
10571
10517
|
var newValue = _objectSpread2({}, value);
|
package/dist/index.js
CHANGED
|
@@ -10177,7 +10177,6 @@ var BsGoods = function BsGoods(props) {
|
|
|
10177
10177
|
React.useEffect(function () {
|
|
10178
10178
|
valueRef.current = value;
|
|
10179
10179
|
pubsub__default['default'].subscribe('type', function (type, data) {
|
|
10180
|
-
console.log(type, data);
|
|
10181
10180
|
if (disabled) return;
|
|
10182
10181
|
withInfo.current = {
|
|
10183
10182
|
type: type,
|
|
@@ -10203,18 +10202,12 @@ var BsGoods = function BsGoods(props) {
|
|
|
10203
10202
|
if (['1', '3'].includes(data.val)) {
|
|
10204
10203
|
var _valueRef$current2;
|
|
10205
10204
|
pubsub__default['default'].publish('reissueSelectListReturn', {
|
|
10206
|
-
list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || [])
|
|
10205
|
+
list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
|
|
10206
|
+
newValue: data === null || data === void 0 ? void 0 : data.newValue
|
|
10207
10207
|
});
|
|
10208
10208
|
}
|
|
10209
10209
|
});
|
|
10210
10210
|
}, [disabled, value]);
|
|
10211
|
-
// useEffect(() => {
|
|
10212
|
-
// if (!disabled) {
|
|
10213
|
-
// pubsub.publish('goodList', {
|
|
10214
|
-
// list: cloneDeep(value?.bsGoods || []),
|
|
10215
|
-
// });
|
|
10216
|
-
// }
|
|
10217
|
-
// }, [value, disabled]);
|
|
10218
10211
|
var _onSelect = function onSelect(list) {
|
|
10219
10212
|
var _withInfo$current, _withInfo$current2;
|
|
10220
10213
|
if (disabled) return;
|
|
@@ -10267,16 +10260,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10267
10260
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
10268
10261
|
disabled = props.disabled,
|
|
10269
10262
|
other = _objectWithoutProperties(props, _excluded$b);
|
|
10270
|
-
var _useState = React.useState([]),
|
|
10271
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10272
|
-
bsGoods = _useState2[0],
|
|
10273
|
-
setBsGoods = _useState2[1];
|
|
10274
10263
|
var valueRef = React.useRef({});
|
|
10275
|
-
// useEffect(() => {
|
|
10276
|
-
// pubsub.subscribe('goodList', (_: any, data: any) => {
|
|
10277
|
-
// setBsGoods(data.list);
|
|
10278
|
-
// });
|
|
10279
|
-
// }, []);
|
|
10280
10264
|
React.useEffect(function () {
|
|
10281
10265
|
valueRef.current = value;
|
|
10282
10266
|
pubsub__default['default'].subscribeOnce('deleteGood', function (_, data) {
|
|
@@ -10299,21 +10283,10 @@ var BsExchange = function BsExchange(props) {
|
|
|
10299
10283
|
onChange(newValue);
|
|
10300
10284
|
}
|
|
10301
10285
|
});
|
|
10302
|
-
// pubsub.subscribeOnce('selectList', (_: any, data: any) => {
|
|
10303
|
-
// if (disabled) return;
|
|
10304
|
-
// if (value) {
|
|
10305
|
-
// const newData = cloneDeep(data);
|
|
10306
|
-
// onChange({
|
|
10307
|
-
// ...value,
|
|
10308
|
-
// bsExchangeReturnGoods: getListHandle([...newData.list], value),
|
|
10309
|
-
// });
|
|
10310
|
-
// }
|
|
10311
|
-
// });
|
|
10312
10286
|
}, [value]);
|
|
10313
10287
|
React.useEffect(function () {
|
|
10314
10288
|
pubsub__default['default'].subscribe('selectList', function (_, data) {
|
|
10315
10289
|
if (disabled) return;
|
|
10316
|
-
console.log('selectList', valueRef.current, data);
|
|
10317
10290
|
if (valueRef.current) {
|
|
10318
10291
|
var newDataList = lodash.cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
|
|
10319
10292
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
|
|
@@ -10385,9 +10358,6 @@ var BsExchange = function BsExchange(props) {
|
|
|
10385
10358
|
newValue.bsExchangeType = val;
|
|
10386
10359
|
newValue.bsExchangeReturnGoods = [];
|
|
10387
10360
|
newValue.bsExchangeGiftGoods = [];
|
|
10388
|
-
// if (['1', '3'].includes(val[0])) {
|
|
10389
|
-
// newValue.bsExchangeReturnGoods = getListHandle(bsGoods, newValue);
|
|
10390
|
-
// }
|
|
10391
10361
|
if (['2', '4'].includes(val[0])) {
|
|
10392
10362
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10393
10363
|
}
|
|
@@ -10407,12 +10377,10 @@ var BsExchange = function BsExchange(props) {
|
|
|
10407
10377
|
newValue[key] = val;
|
|
10408
10378
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10409
10379
|
if (key === 'bsExchangeType') {
|
|
10410
|
-
console.log(val);
|
|
10411
10380
|
pubsub__default['default'].publish('type', val[0]);
|
|
10412
10381
|
}
|
|
10413
10382
|
};
|
|
10414
10383
|
var changeReturnHandle = function changeReturnHandle(val, index, key) {
|
|
10415
|
-
console.log('changeReturnHandle', val, index, key);
|
|
10416
10384
|
var newValue = _objectSpread2({}, value);
|
|
10417
10385
|
newValue.bsExchangeReturnGoods[index][key] = (val || []).map(function (t) {
|
|
10418
10386
|
t.index = index;
|
|
@@ -10514,16 +10482,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10514
10482
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
10515
10483
|
disabled = props.disabled,
|
|
10516
10484
|
other = _objectWithoutProperties(props, _excluded$c);
|
|
10517
|
-
var _useState = React.useState([]),
|
|
10518
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10519
|
-
bsGoods = _useState2[0],
|
|
10520
|
-
setBsGoods = _useState2[1];
|
|
10521
10485
|
var valueRef = React.useRef({});
|
|
10522
|
-
// useEffect(() => {
|
|
10523
|
-
// pubsub.subscribe('goodList', (_: any, data: any) => {
|
|
10524
|
-
// setBsGoods(data.list);
|
|
10525
|
-
// });
|
|
10526
|
-
// }, []);
|
|
10527
10486
|
React.useEffect(function () {
|
|
10528
10487
|
pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
|
|
10529
10488
|
if (disabled) return;
|
|
@@ -10564,19 +10523,6 @@ var BsReissue = function BsReissue(props) {
|
|
|
10564
10523
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10565
10524
|
}
|
|
10566
10525
|
});
|
|
10567
|
-
// pubsub.subscribeOnce('reissueSelectList', (_: any, data: any) => {
|
|
10568
|
-
// if (disabled) return;
|
|
10569
|
-
// if (value) {
|
|
10570
|
-
// const newValue = { ...value };
|
|
10571
|
-
// newValue.bsReissueGoods = data?.list.map((item: any) => {
|
|
10572
|
-
// item.money = 0;
|
|
10573
|
-
// item.share = 0;
|
|
10574
|
-
// item.canUpdateNumber = true;
|
|
10575
|
-
// return item;
|
|
10576
|
-
// });
|
|
10577
|
-
// onChange?.(newValue);
|
|
10578
|
-
// }
|
|
10579
|
-
// });
|
|
10580
10526
|
}, [value, disabled]);
|
|
10581
10527
|
var changeHandle = function changeHandle(val, key) {
|
|
10582
10528
|
var newValue = _objectSpread2({}, value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.73",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a212416de89353bc5f4a45a00bb6670cc10e5feb"
|
|
62
62
|
}
|