@v2coding/ui 1.1.10 → 1.1.11
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/v2coding-ui.esm.js +39 -3
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +42 -4
- package/package.json +1 -1
package/dist/v2coding-ui.ssr.js
CHANGED
|
@@ -2490,6 +2490,45 @@ var DefaultVType = {
|
|
|
2490
2490
|
pattern: /^(?=.*[a-zA-Z])(?=.*\d)[^]{6,20}$/,
|
|
2491
2491
|
message: message || "\u8BF7\u8F93\u51656-20\u4F4D\u7684".concat(label, ",\u81F3\u5C11\u5305\u542B\u5B57\u6BCD\u548C\u5B57\u7B26\u4E32")
|
|
2492
2492
|
};
|
|
2493
|
+
},
|
|
2494
|
+
complexCipher: function complexCipher(_ref17) {
|
|
2495
|
+
_ref17.label;
|
|
2496
|
+
_ref17.message;
|
|
2497
|
+
return {
|
|
2498
|
+
validator: function validator(rule, value, callback) {
|
|
2499
|
+
// 检查重复的数字
|
|
2500
|
+
var repeatingRegex = /(\d)\1{5,}/; // 匹配连续重复6次或以上的数字
|
|
2501
|
+
// 检查连续递增的数字
|
|
2502
|
+
|
|
2503
|
+
for (var i = 0; i < value.length - 1; i++) {
|
|
2504
|
+
if (Number(value[i + 1]) - Number(value[i]) === 1) {
|
|
2505
|
+
var sequenceStart = i;
|
|
2506
|
+
var sequenceEnd = i + 1; // 1 < 6 && 2 - 1 === 1
|
|
2507
|
+
// 2 < 6 && 3 - 2 === 1
|
|
2508
|
+
// 3 < 6 && 4 - 3 === 1
|
|
2509
|
+
// .....
|
|
2510
|
+
|
|
2511
|
+
while (sequenceEnd < value.length && Number(value[sequenceEnd]) - Number(value[sequenceEnd - 1]) === 1) {
|
|
2512
|
+
sequenceEnd++;
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
if (sequenceEnd - sequenceStart >= 6) {
|
|
2516
|
+
// 至少需要6个数字才能构成连续序列
|
|
2517
|
+
callback(new Error('不能输入连续的数字'));
|
|
2518
|
+
return;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
i = sequenceEnd - 1; // 跳过已检查的序列
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
if (repeatingRegex.test(value)) {
|
|
2526
|
+
callback(new Error('不能连续输入任何一个重复的数字超过6个'));
|
|
2527
|
+
} else {
|
|
2528
|
+
callback();
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
};
|
|
2493
2532
|
}
|
|
2494
2533
|
};
|
|
2495
2534
|
|
|
@@ -2503,8 +2542,7 @@ var initDefaultVType = function initDefaultVType() {
|
|
|
2503
2542
|
});
|
|
2504
2543
|
};
|
|
2505
2544
|
|
|
2506
|
-
initDefaultVType();
|
|
2507
|
-
var VType$1 = VType;var _excluded$a = ["change", "input"];
|
|
2545
|
+
initDefaultVType();var _excluded$a = ["change", "input"];
|
|
2508
2546
|
var FieldMixin = {
|
|
2509
2547
|
inheritAttrs: false,
|
|
2510
2548
|
inject: {
|
|
@@ -7771,7 +7809,7 @@ var script$g = {
|
|
|
7771
7809
|
type = _vtype$split2[0],
|
|
7772
7810
|
args = _vtype$split2.slice(1);
|
|
7773
7811
|
|
|
7774
|
-
rule = VType
|
|
7812
|
+
rule = VType[type].apply(VType, [_this.$props].concat(_toConsumableArray(args)));
|
|
7775
7813
|
}
|
|
7776
7814
|
|
|
7777
7815
|
rule && rules.push(rule);
|
|
@@ -13410,4 +13448,4 @@ var index = {
|
|
|
13410
13448
|
}
|
|
13411
13449
|
},
|
|
13412
13450
|
Components: ComponentList
|
|
13413
|
-
};exports.Arrays=arrays;exports.Axios=Axios;exports.Dates=Date$1;exports.FieldMixin=FieldMixin;exports.Files=Files;exports.HistoryMixin=mixin;exports.Objects=Objects;exports.Router=Router;exports.Store=Store;exports.Strings=Strings;exports.Upload=Upload;exports.addFieldType=addFieldType;exports["default"]=index;exports.getAMap=getAMap;exports.onReady=onReady;
|
|
13451
|
+
};exports.Arrays=arrays;exports.Axios=Axios;exports.Dates=Date$1;exports.FieldMixin=FieldMixin;exports.Files=Files;exports.HistoryMixin=mixin;exports.Objects=Objects;exports.Router=Router;exports.Store=Store;exports.Strings=Strings;exports.Upload=Upload;exports.addFieldType=addFieldType;exports.addVType=addVType;exports["default"]=index;exports.getAMap=getAMap;exports.onReady=onReady;
|