@lingxiteam/assets 1.0.12-alpha.1 → 1.0.12-alpha.2
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/es/dealDsl/preprocess/common.js +4 -14
- package/es/rootConfig/todoActionList.d.ts +11 -2
- package/es/rootConfig/todoActionList.js +12 -0
- package/es/security/fetch.js +7 -0
- package/lib/dealDsl/preprocess/common.js +4 -14
- package/lib/rootConfig/todoActionList.d.ts +11 -2
- package/lib/rootConfig/todoActionList.js +12 -0
- package/lib/security/fetch.js +7 -0
- package/package.json +1 -1
|
@@ -120,16 +120,11 @@ var h5 = {
|
|
|
120
120
|
if (Array.isArray(regexp)) {
|
|
121
121
|
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
122
122
|
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
123
|
-
// 运行态会给正则加上$$符号
|
|
124
123
|
var idCardRegexp = regexp.find(function (reg) {
|
|
125
|
-
return reg.pattern ===
|
|
124
|
+
return reg.pattern === oldRegStr;
|
|
126
125
|
});
|
|
127
126
|
if (idCardRegexp) {
|
|
128
|
-
|
|
129
|
-
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
130
|
-
} else {
|
|
131
|
-
idCardRegexp.pattern = newRegStr;
|
|
132
|
-
}
|
|
127
|
+
idCardRegexp.pattern = newRegStr;
|
|
133
128
|
}
|
|
134
129
|
}
|
|
135
130
|
return component;
|
|
@@ -388,16 +383,11 @@ var pc = {
|
|
|
388
383
|
if (Array.isArray(regexp)) {
|
|
389
384
|
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
390
385
|
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
391
|
-
// 运行态会给正则加上$$符号
|
|
392
386
|
var idCardRegexp = regexp.find(function (reg) {
|
|
393
|
-
return reg.pattern ===
|
|
387
|
+
return reg.pattern === oldRegStr;
|
|
394
388
|
});
|
|
395
389
|
if (idCardRegexp) {
|
|
396
|
-
|
|
397
|
-
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
398
|
-
} else {
|
|
399
|
-
idCardRegexp.pattern = newRegStr;
|
|
400
|
-
}
|
|
390
|
+
idCardRegexp.pattern = newRegStr;
|
|
401
391
|
}
|
|
402
392
|
}
|
|
403
393
|
return component;
|
|
@@ -531,10 +531,19 @@ declare const todoActionObject: {
|
|
|
531
531
|
label: string;
|
|
532
532
|
type: string;
|
|
533
533
|
props: {
|
|
534
|
-
options: {
|
|
534
|
+
options: ({
|
|
535
535
|
title: string;
|
|
536
536
|
value: string;
|
|
537
|
-
|
|
537
|
+
key?: undefined;
|
|
538
|
+
label?: undefined;
|
|
539
|
+
type?: undefined;
|
|
540
|
+
} | {
|
|
541
|
+
key: string;
|
|
542
|
+
label: string;
|
|
543
|
+
type: string;
|
|
544
|
+
title?: undefined;
|
|
545
|
+
value?: undefined;
|
|
546
|
+
})[];
|
|
538
547
|
};
|
|
539
548
|
} | {
|
|
540
549
|
key: string;
|
|
@@ -644,6 +644,10 @@ var todoActionObject = {
|
|
|
644
644
|
aliasKey: 'searchParams',
|
|
645
645
|
label: 'url参数',
|
|
646
646
|
type: 'SearchParams'
|
|
647
|
+
}, {
|
|
648
|
+
key: 'routerData',
|
|
649
|
+
label: '路由数据',
|
|
650
|
+
type: 'RouterData'
|
|
647
651
|
}]
|
|
648
652
|
},
|
|
649
653
|
historyReplace: {
|
|
@@ -675,6 +679,10 @@ var todoActionObject = {
|
|
|
675
679
|
}, {
|
|
676
680
|
title: '路由替换',
|
|
677
681
|
value: 'replace'
|
|
682
|
+
}, {
|
|
683
|
+
key: 'routerData',
|
|
684
|
+
label: '路由数据',
|
|
685
|
+
type: 'RouterData'
|
|
678
686
|
}]
|
|
679
687
|
}
|
|
680
688
|
}, {
|
|
@@ -686,6 +694,10 @@ var todoActionObject = {
|
|
|
686
694
|
aliasKey: 'searchParams',
|
|
687
695
|
label: 'url参数',
|
|
688
696
|
type: 'SearchParams'
|
|
697
|
+
}, {
|
|
698
|
+
key: 'routerData',
|
|
699
|
+
label: '路由数据',
|
|
700
|
+
type: 'RouterData'
|
|
689
701
|
}],
|
|
690
702
|
classification: [{
|
|
691
703
|
label: '页面类',
|
package/es/security/fetch.js
CHANGED
|
@@ -110,11 +110,18 @@ function encrypted(url, opts, type) {
|
|
|
110
110
|
// });
|
|
111
111
|
// }
|
|
112
112
|
var fetch = function fetch(url) {
|
|
113
|
+
var _opts$headers;
|
|
113
114
|
var fetchOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
114
115
|
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
115
116
|
var opts = _objectSpread({}, fetchOptions);
|
|
116
117
|
var optSecurityHeaderKey = (opts.headers || {})[securityHeaderKey];
|
|
117
118
|
var isDebug = (config === null || config === void 0 ? void 0 : config.debug) || window.lxDebug || !!window.localStorage.getItem('lxDebug') || true;
|
|
119
|
+
// 如果在headers 传入disabledSignKey标识 标识不启用加密
|
|
120
|
+
if ((opts === null || opts === void 0 ? void 0 : (_opts$headers = opts.headers) === null || _opts$headers === void 0 ? void 0 : _opts$headers.disabledSignKey) !== true) {
|
|
121
|
+
var _opts$headers2;
|
|
122
|
+
opts === null || opts === void 0 ? true : (_opts$headers2 = opts.headers) === null || _opts$headers2 === void 0 ? true : delete _opts$headers2.disabledSignKey;
|
|
123
|
+
return originFetch(url, opts);
|
|
124
|
+
}
|
|
118
125
|
// ------ 参数签名(默认) ------
|
|
119
126
|
if (
|
|
120
127
|
// 配置开启加密
|
|
@@ -126,16 +126,11 @@ var h5 = {
|
|
|
126
126
|
if (Array.isArray(regexp)) {
|
|
127
127
|
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
128
128
|
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
129
|
-
// 运行态会给正则加上$$符号
|
|
130
129
|
var idCardRegexp = regexp.find(function (reg) {
|
|
131
|
-
return reg.pattern ===
|
|
130
|
+
return reg.pattern === oldRegStr;
|
|
132
131
|
});
|
|
133
132
|
if (idCardRegexp) {
|
|
134
|
-
|
|
135
|
-
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
136
|
-
} else {
|
|
137
|
-
idCardRegexp.pattern = newRegStr;
|
|
138
|
-
}
|
|
133
|
+
idCardRegexp.pattern = newRegStr;
|
|
139
134
|
}
|
|
140
135
|
}
|
|
141
136
|
return component;
|
|
@@ -394,16 +389,11 @@ var pc = {
|
|
|
394
389
|
if (Array.isArray(regexp)) {
|
|
395
390
|
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
396
391
|
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
397
|
-
// 运行态会给正则加上$$符号
|
|
398
392
|
var idCardRegexp = regexp.find(function (reg) {
|
|
399
|
-
return reg.pattern ===
|
|
393
|
+
return reg.pattern === oldRegStr;
|
|
400
394
|
});
|
|
401
395
|
if (idCardRegexp) {
|
|
402
|
-
|
|
403
|
-
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
404
|
-
} else {
|
|
405
|
-
idCardRegexp.pattern = newRegStr;
|
|
406
|
-
}
|
|
396
|
+
idCardRegexp.pattern = newRegStr;
|
|
407
397
|
}
|
|
408
398
|
}
|
|
409
399
|
return component;
|
|
@@ -531,10 +531,19 @@ declare const todoActionObject: {
|
|
|
531
531
|
label: string;
|
|
532
532
|
type: string;
|
|
533
533
|
props: {
|
|
534
|
-
options: {
|
|
534
|
+
options: ({
|
|
535
535
|
title: string;
|
|
536
536
|
value: string;
|
|
537
|
-
|
|
537
|
+
key?: undefined;
|
|
538
|
+
label?: undefined;
|
|
539
|
+
type?: undefined;
|
|
540
|
+
} | {
|
|
541
|
+
key: string;
|
|
542
|
+
label: string;
|
|
543
|
+
type: string;
|
|
544
|
+
title?: undefined;
|
|
545
|
+
value?: undefined;
|
|
546
|
+
})[];
|
|
538
547
|
};
|
|
539
548
|
} | {
|
|
540
549
|
key: string;
|
|
@@ -650,6 +650,10 @@ var todoActionObject = {
|
|
|
650
650
|
aliasKey: 'searchParams',
|
|
651
651
|
label: 'url参数',
|
|
652
652
|
type: 'SearchParams'
|
|
653
|
+
}, {
|
|
654
|
+
key: 'routerData',
|
|
655
|
+
label: '路由数据',
|
|
656
|
+
type: 'RouterData'
|
|
653
657
|
}]
|
|
654
658
|
},
|
|
655
659
|
historyReplace: {
|
|
@@ -681,6 +685,10 @@ var todoActionObject = {
|
|
|
681
685
|
}, {
|
|
682
686
|
title: '路由替换',
|
|
683
687
|
value: 'replace'
|
|
688
|
+
}, {
|
|
689
|
+
key: 'routerData',
|
|
690
|
+
label: '路由数据',
|
|
691
|
+
type: 'RouterData'
|
|
684
692
|
}]
|
|
685
693
|
}
|
|
686
694
|
}, {
|
|
@@ -692,6 +700,10 @@ var todoActionObject = {
|
|
|
692
700
|
aliasKey: 'searchParams',
|
|
693
701
|
label: 'url参数',
|
|
694
702
|
type: 'SearchParams'
|
|
703
|
+
}, {
|
|
704
|
+
key: 'routerData',
|
|
705
|
+
label: '路由数据',
|
|
706
|
+
type: 'RouterData'
|
|
695
707
|
}],
|
|
696
708
|
classification: [{
|
|
697
709
|
label: '页面类',
|
package/lib/security/fetch.js
CHANGED
|
@@ -116,11 +116,18 @@ function encrypted(url, opts, type) {
|
|
|
116
116
|
// });
|
|
117
117
|
// }
|
|
118
118
|
var fetch = function fetch(url) {
|
|
119
|
+
var _opts$headers;
|
|
119
120
|
var fetchOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
120
121
|
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
121
122
|
var opts = _objectSpread({}, fetchOptions);
|
|
122
123
|
var optSecurityHeaderKey = (opts.headers || {})[_const.securityHeaderKey];
|
|
123
124
|
var isDebug = (config === null || config === void 0 ? void 0 : config.debug) || window.lxDebug || !!window.localStorage.getItem('lxDebug') || true;
|
|
125
|
+
// 如果在headers 传入disabledSignKey标识 标识不启用加密
|
|
126
|
+
if ((opts === null || opts === void 0 ? void 0 : (_opts$headers = opts.headers) === null || _opts$headers === void 0 ? void 0 : _opts$headers.disabledSignKey) !== true) {
|
|
127
|
+
var _opts$headers2;
|
|
128
|
+
opts === null || opts === void 0 ? true : (_opts$headers2 = opts.headers) === null || _opts$headers2 === void 0 ? true : delete _opts$headers2.disabledSignKey;
|
|
129
|
+
return originFetch(url, opts);
|
|
130
|
+
}
|
|
124
131
|
// ------ 参数签名(默认) ------
|
|
125
132
|
if (
|
|
126
133
|
// 配置开启加密
|