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.
@@ -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: import("szld-libs/lib/components/CreateForm").CreateFormItemProps<import("szld-libs/lib/components/CreateForm").ValueType>[];
26
+ formItems: CreateFormProps;
27
27
  selList: any[];
28
28
  }>;
29
29
  handleUniversalDelete: ({ commonRequest, refresh, interfaceType, record, configData, }: {
@@ -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
- options = urlData.map((val) => ({
508
- label: handleUrlOptions(val, delimiter, keyFieldList),
509
- value: handleUrlOptions(val, delimiter, keyFieldList)
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.24",
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.2.55"
26
+ "szld-libs": "^0.3.24"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/crypto-js": "^4.2.1",