szld-libs 0.3.24 → 0.3.26
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 +12427 -12714
- package/dist/szld-components.umd.js +49 -49
- package/es/components/DynamicForm/func.d.ts +1 -11
- package/es/components/DynamicForm/func.js +0 -90
- package/es/components/DynamicForm/index.d.ts +1 -0
- package/es/components/DynamicForm/mySelect/index.js +2 -1
- package/es/components/DynamicFormMobile/func.d.ts +1 -11
- package/es/components/DynamicFormMobile/func.js +0 -90
- package/es/components/DynamicFormMobile/index.d.ts +1 -0
- package/es/components/DynamicFormMobile/mySelect/index.js +1 -1
- package/es/hooks/useDetailRender.js +1 -1
- package/es/hooks/useUniversalTable.d.ts +1 -1
- package/es/utils/method.js +9 -4
- package/lib/components/DynamicForm/func.d.ts +1 -11
- package/lib/components/DynamicForm/func.js +0 -90
- package/lib/components/DynamicForm/index.d.ts +1 -0
- package/lib/components/DynamicForm/mySelect/index.js +2 -1
- package/lib/components/DynamicFormMobile/func.d.ts +1 -11
- package/lib/components/DynamicFormMobile/func.js +0 -90
- package/lib/components/DynamicFormMobile/index.d.ts +1 -0
- package/lib/components/DynamicFormMobile/mySelect/index.js +2 -2
- package/lib/hooks/useDetailRender.js +1 -1
- package/lib/hooks/useUniversalTable.d.ts +1 -1
- package/lib/utils/method.js +9 -4
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const method = require("szld-libs/lib/utils/method");
|
|
4
3
|
const antd = require("antd");
|
|
5
4
|
const szxkFunc = require("../utils/szxkFunc");
|
|
5
|
+
const method = require("../utils/method");
|
|
6
6
|
const ahooks = require("ahooks");
|
|
7
7
|
const react = require("react");
|
|
8
8
|
function useDetailRender({
|
|
@@ -23,7 +23,7 @@ declare function useUniversalTable(): {
|
|
|
23
23
|
searchText?: string | undefined;
|
|
24
24
|
resetText?: string | undefined;
|
|
25
25
|
}) => Promise<{
|
|
26
|
-
formItems:
|
|
26
|
+
formItems: CreateFormProps;
|
|
27
27
|
selList: any[];
|
|
28
28
|
}>;
|
|
29
29
|
handleUniversalDelete: ({ commonRequest, refresh, interfaceType, record, configData, }: {
|
package/lib/utils/method.js
CHANGED
|
@@ -479,6 +479,7 @@ const handleSelectOptions = async ({
|
|
|
479
479
|
try {
|
|
480
480
|
const keyFieldList = ((_a2 = item == null ? void 0 : item["key-field"]) == null ? void 0 : _a2.list) || [];
|
|
481
481
|
const delimiter = ((_b = item == null ? void 0 : item["key-field"]) == null ? void 0 : _b.delimiter) || "";
|
|
482
|
+
const fileNames = item == null ? void 0 : item["field-names"];
|
|
482
483
|
if (!keyFieldList.length) {
|
|
483
484
|
antd.message.error("请配置key-field");
|
|
484
485
|
return;
|
|
@@ -504,10 +505,14 @@ const handleSelectOptions = async ({
|
|
|
504
505
|
if (Array.isArray(list)) {
|
|
505
506
|
urlData = list;
|
|
506
507
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
508
|
+
if (fileNames) {
|
|
509
|
+
options = urlData;
|
|
510
|
+
} else {
|
|
511
|
+
options = urlData.map((val) => ({
|
|
512
|
+
label: handleUrlOptions(val, delimiter, keyFieldList),
|
|
513
|
+
value: handleUrlOptions(val, delimiter, keyFieldList)
|
|
514
|
+
}));
|
|
515
|
+
}
|
|
511
516
|
}
|
|
512
517
|
} catch (error) {
|
|
513
518
|
antd.message.error("加载选项失败");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "szld-libs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.26",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-router-dom": "^6.6.1",
|
|
24
24
|
"react-vant": "^3.3.5",
|
|
25
25
|
"react-window": "^1.8.9",
|
|
26
|
-
"szld-libs": "^0.
|
|
26
|
+
"szld-libs": "^0.3.24"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/crypto-js": "^4.2.1",
|