szld-libs 0.2.87 → 0.2.89
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/szld-components.es.js +4 -4
- package/dist/szld-components.umd.js +1 -1
- package/es/components/DynamicForm/useDynamicForm.js +3 -3
- package/es/utils/szxkFunc.d.ts +1 -1
- package/es/utils/szxkFunc.js +2 -2
- package/lib/components/DynamicForm/useDynamicForm.js +3 -3
- package/lib/utils/szxkFunc.d.ts +1 -1
- package/lib/utils/szxkFunc.js +2 -2
- package/package.json +1 -1
|
@@ -321,7 +321,7 @@ function useDynamicForm(props) {
|
|
|
321
321
|
] : [],
|
|
322
322
|
...((_c2 = itemWithJson.json) == null ? void 0 : _c2.regexp) ? [
|
|
323
323
|
{
|
|
324
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
324
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
325
325
|
message: ((_d2 = itemWithJson.json) == null ? void 0 : _d2["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
326
326
|
}
|
|
327
327
|
] : []
|
|
@@ -361,7 +361,7 @@ function useDynamicForm(props) {
|
|
|
361
361
|
] : [],
|
|
362
362
|
...((_g = itemWithJson.json) == null ? void 0 : _g.regexp) ? [
|
|
363
363
|
{
|
|
364
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
364
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
365
365
|
message: ((_h = itemWithJson.json) == null ? void 0 : _h["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
366
366
|
}
|
|
367
367
|
] : []
|
|
@@ -395,7 +395,7 @@ function useDynamicForm(props) {
|
|
|
395
395
|
] : [],
|
|
396
396
|
...((_j = itemWithJson.json) == null ? void 0 : _j.regexp) ? [
|
|
397
397
|
{
|
|
398
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
398
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
399
399
|
message: ((_k = itemWithJson.json) == null ? void 0 : _k["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
400
400
|
}
|
|
401
401
|
] : []
|
package/es/utils/szxkFunc.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { AxiosResponse } from 'axios';
|
|
|
6
6
|
* @param interfaceType 接口类型,默认值为'YLFWLRDataDetails'
|
|
7
7
|
* @returns 属性集详情 {attrid_attrtype: attrvalue} 格式的数据
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const handleGetAttrDetail: (params: any, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
|
|
10
10
|
/**
|
|
11
11
|
* 单层详情数据对应到单个属性集
|
|
12
12
|
* @param attrList 属性集列表
|
package/es/utils/szxkFunc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
|
|
2
2
|
var _a;
|
|
3
3
|
try {
|
|
4
4
|
const res = await commonRequest(interfaceType || "YLFWLRDataDetails", params);
|
|
@@ -16,6 +16,6 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
handleGetAttrDetail,
|
|
20
20
|
handleObjDetailToSignleAttrList
|
|
21
21
|
};
|
|
@@ -322,7 +322,7 @@ function useDynamicForm(props) {
|
|
|
322
322
|
] : [],
|
|
323
323
|
...((_c2 = itemWithJson.json) == null ? void 0 : _c2.regexp) ? [
|
|
324
324
|
{
|
|
325
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
325
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
326
326
|
message: ((_d2 = itemWithJson.json) == null ? void 0 : _d2["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
327
327
|
}
|
|
328
328
|
] : []
|
|
@@ -362,7 +362,7 @@ function useDynamicForm(props) {
|
|
|
362
362
|
] : [],
|
|
363
363
|
...((_g = itemWithJson.json) == null ? void 0 : _g.regexp) ? [
|
|
364
364
|
{
|
|
365
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
365
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
366
366
|
message: ((_h = itemWithJson.json) == null ? void 0 : _h["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
367
367
|
}
|
|
368
368
|
] : []
|
|
@@ -396,7 +396,7 @@ function useDynamicForm(props) {
|
|
|
396
396
|
] : [],
|
|
397
397
|
...((_j = itemWithJson.json) == null ? void 0 : _j.regexp) ? [
|
|
398
398
|
{
|
|
399
|
-
pattern: new RegExp(itemWithJson.json.regexp),
|
|
399
|
+
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
400
400
|
message: ((_k = itemWithJson.json) == null ? void 0 : _k["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
401
401
|
}
|
|
402
402
|
] : []
|
package/lib/utils/szxkFunc.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { AxiosResponse } from 'axios';
|
|
|
6
6
|
* @param interfaceType 接口类型,默认值为'YLFWLRDataDetails'
|
|
7
7
|
* @returns 属性集详情 {attrid_attrtype: attrvalue} 格式的数据
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const handleGetAttrDetail: (params: any, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
|
|
10
10
|
/**
|
|
11
11
|
* 单层详情数据对应到单个属性集
|
|
12
12
|
* @param attrList 属性集列表
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
|
|
4
4
|
var _a;
|
|
5
5
|
try {
|
|
6
6
|
const res = await commonRequest(interfaceType || "YLFWLRDataDetails", params);
|
|
@@ -17,5 +17,5 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
17
17
|
attrvalue: detail[item.attrid] || ""
|
|
18
18
|
}));
|
|
19
19
|
};
|
|
20
|
-
exports.
|
|
20
|
+
exports.handleGetAttrDetail = handleGetAttrDetail;
|
|
21
21
|
exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
|