@kmkf-fe-packages/services-components 0.7.15-alpha.73 → 0.7.15-alpha.74
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.
|
@@ -86,17 +86,17 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
86
86
|
this.componentConfig = options.componentConfig;
|
|
87
87
|
this.rules = [{
|
|
88
88
|
validator: function validator(_, value) {
|
|
89
|
-
var _this$componentConfig3, _this$componentConfig4;
|
|
89
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
90
90
|
if (!value) {
|
|
91
91
|
return Promise.resolve();
|
|
92
92
|
}
|
|
93
|
-
var number = /^(
|
|
93
|
+
var number = /^(\-|\+)?\d+(\.\d+)?$/;
|
|
94
94
|
var mail = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/;
|
|
95
95
|
var phone = /^1\d{10}$/;
|
|
96
96
|
var testList = [];
|
|
97
|
-
|
|
98
|
-
((_this$
|
|
99
|
-
((_this$
|
|
97
|
+
((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.isNumber) && testList.push(number);
|
|
98
|
+
((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.isMail) && testList.push(mail);
|
|
99
|
+
((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.isPhone) && testList.push(phone);
|
|
100
100
|
var isTest = testList.some(function (item) {
|
|
101
101
|
return item.test(value);
|
|
102
102
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.74",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.74",
|
|
30
30
|
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.71"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "aa4a53b173174e0d3b5c0fc90abfc54def9a4642"
|
|
44
44
|
}
|