@signalplus/params-about 1.0.26-alpha5 → 1.0.26-alpha7
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/lib/es/index.js +46 -2
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bundle of @signalplus/params-about
|
|
3
|
-
* Generated: 2025-
|
|
4
|
-
* Version: 1.0.26-
|
|
3
|
+
* Generated: 2025-11-03
|
|
4
|
+
* Version: 1.0.26-alpha7
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -2921,6 +2921,10 @@ function emptyErrText(index, key) {
|
|
|
2921
2921
|
return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should not be empty");
|
|
2922
2922
|
}
|
|
2923
2923
|
|
|
2924
|
+
function zeroErrText(index, key, type) {
|
|
2925
|
+
return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should be ").concat(type === 'min' ? '<' : '>', " 0");
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2924
2928
|
var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig, ParamType.ParamGroup, {
|
|
2925
2929
|
name: '参数组',
|
|
2926
2930
|
Comp: function Comp() {
|
|
@@ -3250,6 +3254,10 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3250
3254
|
return emptyErrText(i, 'vegaTarget');
|
|
3251
3255
|
}
|
|
3252
3256
|
|
|
3257
|
+
if (Number(val.vegaTarget) === 0) {
|
|
3258
|
+
return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: vega target can not be 0");
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3253
3261
|
var $$val = val.vegaRules || [];
|
|
3254
3262
|
|
|
3255
3263
|
for (var k = 0; k < $$val.length; k++) {
|
|
@@ -3282,6 +3290,42 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3282
3290
|
if (isEmpty(vegaRule.askEdgeSpan.to)) {
|
|
3283
3291
|
return emptyErrText(i, "ask edge range's to");
|
|
3284
3292
|
}
|
|
3293
|
+
|
|
3294
|
+
if (Number(val.vegaTarget) > 0) {
|
|
3295
|
+
if (Number(vegaRule.bidEdgeSpan.from) <= 0) {
|
|
3296
|
+
return zeroErrText(i, "bid edge range's from", 'max');
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
if (Number(vegaRule.bidEdgeSpan.to) <= 0) {
|
|
3300
|
+
return zeroErrText(i, "bid edge range's to", 'max');
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
if (Number(vegaRule.askEdgeSpan.from) <= 0) {
|
|
3304
|
+
return zeroErrText(i, "ask edge range's from", 'max');
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
if (Number(vegaRule.askEdgeSpan.to) <= 0) {
|
|
3308
|
+
return zeroErrText(i, "ask edge range's to", 'max');
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
if (Number(val.vegaTarget) < 0) {
|
|
3313
|
+
if (Number(vegaRule.bidEdgeSpan.from) >= 0) {
|
|
3314
|
+
return zeroErrText(i, "bid edge range's from", 'min');
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
if (Number(vegaRule.bidEdgeSpan.to) >= 0) {
|
|
3318
|
+
return zeroErrText(i, "bid edge range's to", 'min');
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
if (Number(vegaRule.askEdgeSpan.from) >= 0) {
|
|
3322
|
+
return zeroErrText(i, "ask edge range's from", 'min');
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
if (Number(vegaRule.askEdgeSpan.to) >= 0) {
|
|
3326
|
+
return zeroErrText(i, "ask edge range's to", 'min');
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3285
3329
|
} // if (expiries.includes(val.expiry)) {
|
|
3286
3330
|
// return `The ${i + 1} ${
|
|
3287
3331
|
// i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th'
|