@kmkf-fe-packages/basic-components 2.2.13-beta.36 → 2.2.13-beta.37
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 +35 -0
- package/dist/index.js +35 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -20376,6 +20376,15 @@ var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
|
|
|
20376
20376
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
20377
20377
|
return false;
|
|
20378
20378
|
};
|
|
20379
|
+
function toNum$3(value) {
|
|
20380
|
+
if (typeof value === 'string') {
|
|
20381
|
+
return value ? +value : void 0;
|
|
20382
|
+
}
|
|
20383
|
+
if (typeof value === 'number') {
|
|
20384
|
+
return value;
|
|
20385
|
+
}
|
|
20386
|
+
return void 0;
|
|
20387
|
+
}
|
|
20379
20388
|
var getColumns$7 = function getColumns(_ref) {
|
|
20380
20389
|
var _ref$text = _ref.text,
|
|
20381
20390
|
disabled = _ref.disabled,
|
|
@@ -20492,6 +20501,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20492
20501
|
dataIndex: 'sellCount',
|
|
20493
20502
|
title: "\u6570\u91CF",
|
|
20494
20503
|
width: 100,
|
|
20504
|
+
validator: function validator(_rule, value) {
|
|
20505
|
+
var productName = '';
|
|
20506
|
+
if (((value === null || value === void 0 ? void 0 : value.jyGoods) || []).some(function (goods) {
|
|
20507
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20508
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20509
|
+
if (res) {
|
|
20510
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20511
|
+
}
|
|
20512
|
+
return res;
|
|
20513
|
+
})) {
|
|
20514
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20515
|
+
}
|
|
20516
|
+
},
|
|
20495
20517
|
render: function render(val, record, index) {
|
|
20496
20518
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
20497
20519
|
style: {
|
|
@@ -20687,6 +20709,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20687
20709
|
dataIndex: 'sellCount',
|
|
20688
20710
|
title: "\u6570\u91CF",
|
|
20689
20711
|
width: 100,
|
|
20712
|
+
validator: function validator(_rule, value) {
|
|
20713
|
+
var productName = '';
|
|
20714
|
+
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
20715
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20716
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20717
|
+
if (res) {
|
|
20718
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20719
|
+
}
|
|
20720
|
+
return res;
|
|
20721
|
+
})) {
|
|
20722
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20723
|
+
}
|
|
20724
|
+
},
|
|
20690
20725
|
render: function render(val, record, index) {
|
|
20691
20726
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
20692
20727
|
style: {
|
package/dist/index.js
CHANGED
|
@@ -20391,6 +20391,15 @@ var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
|
|
|
20391
20391
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
20392
20392
|
return false;
|
|
20393
20393
|
};
|
|
20394
|
+
function toNum$3(value) {
|
|
20395
|
+
if (typeof value === 'string') {
|
|
20396
|
+
return value ? +value : void 0;
|
|
20397
|
+
}
|
|
20398
|
+
if (typeof value === 'number') {
|
|
20399
|
+
return value;
|
|
20400
|
+
}
|
|
20401
|
+
return void 0;
|
|
20402
|
+
}
|
|
20394
20403
|
var getColumns$7 = function getColumns(_ref) {
|
|
20395
20404
|
var _ref$text = _ref.text,
|
|
20396
20405
|
disabled = _ref.disabled,
|
|
@@ -20507,6 +20516,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20507
20516
|
dataIndex: 'sellCount',
|
|
20508
20517
|
title: "\u6570\u91CF",
|
|
20509
20518
|
width: 100,
|
|
20519
|
+
validator: function validator(_rule, value) {
|
|
20520
|
+
var productName = '';
|
|
20521
|
+
if (((value === null || value === void 0 ? void 0 : value.jyGoods) || []).some(function (goods) {
|
|
20522
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20523
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20524
|
+
if (res) {
|
|
20525
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20526
|
+
}
|
|
20527
|
+
return res;
|
|
20528
|
+
})) {
|
|
20529
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20530
|
+
}
|
|
20531
|
+
},
|
|
20510
20532
|
render: function render(val, record, index) {
|
|
20511
20533
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20512
20534
|
style: {
|
|
@@ -20702,6 +20724,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20702
20724
|
dataIndex: 'sellCount',
|
|
20703
20725
|
title: "\u6570\u91CF",
|
|
20704
20726
|
width: 100,
|
|
20727
|
+
validator: function validator(_rule, value) {
|
|
20728
|
+
var productName = '';
|
|
20729
|
+
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
20730
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20731
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20732
|
+
if (res) {
|
|
20733
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20734
|
+
}
|
|
20735
|
+
return res;
|
|
20736
|
+
})) {
|
|
20737
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20738
|
+
}
|
|
20739
|
+
},
|
|
20705
20740
|
render: function render(val, record, index) {
|
|
20706
20741
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20707
20742
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.2.13-beta.
|
|
3
|
+
"version": "2.2.13-beta.37",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "3977215f50acaf734d943755b66458971d4451d7"
|
|
70
70
|
}
|