szld-libs 0.3.31 → 0.3.36

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.
Files changed (41) hide show
  1. package/dist/szld-components.es.js +13903 -13972
  2. package/dist/szld-components.umd.js +53 -53
  3. package/es/components/DynamicForm/func.d.ts +1 -5
  4. package/es/components/DynamicForm/func.js +5 -0
  5. package/es/components/DynamicForm/index.js +4 -2
  6. package/es/components/DynamicForm/myCheckbox/index.d.ts +1 -1
  7. package/es/components/DynamicForm/myCheckbox/index.js +17 -70
  8. package/es/components/DynamicForm/myRadio/index.d.ts +1 -1
  9. package/es/components/DynamicForm/myRadio/index.js +17 -73
  10. package/es/components/DynamicForm/mySelect/index.d.ts +2 -1
  11. package/es/components/DynamicForm/mySelect/index.js +5 -3
  12. package/es/components/DynamicForm/useDynamicForm.d.ts +1 -0
  13. package/es/components/DynamicForm/useDynamicForm.js +16 -13
  14. package/es/components/DynamicFormMobile/func.d.ts +0 -5
  15. package/es/components/DynamicFormMobile/mySelect/index.js +1 -1
  16. package/es/hooks/useUniversalTable.js +1 -1
  17. package/es/index.js +19 -12
  18. package/es/mock/index.d.ts +14 -0
  19. package/es/mock/index.js +374 -70
  20. package/es/utils/method.d.ts +2 -1
  21. package/es/utils/method.js +4 -2
  22. package/lib/components/DynamicForm/func.d.ts +1 -5
  23. package/lib/components/DynamicForm/func.js +5 -0
  24. package/lib/components/DynamicForm/index.js +4 -2
  25. package/lib/components/DynamicForm/myCheckbox/index.d.ts +1 -1
  26. package/lib/components/DynamicForm/myCheckbox/index.js +16 -69
  27. package/lib/components/DynamicForm/myRadio/index.d.ts +1 -1
  28. package/lib/components/DynamicForm/myRadio/index.js +16 -72
  29. package/lib/components/DynamicForm/mySelect/index.d.ts +2 -1
  30. package/lib/components/DynamicForm/mySelect/index.js +5 -3
  31. package/lib/components/DynamicForm/useDynamicForm.d.ts +1 -0
  32. package/lib/components/DynamicForm/useDynamicForm.js +15 -12
  33. package/lib/components/DynamicFormMobile/func.d.ts +0 -5
  34. package/lib/components/DynamicFormMobile/mySelect/index.js +1 -1
  35. package/lib/hooks/useUniversalTable.js +1 -1
  36. package/lib/index.js +16 -9
  37. package/lib/mock/index.d.ts +14 -0
  38. package/lib/mock/index.js +373 -69
  39. package/lib/utils/method.d.ts +2 -1
  40. package/lib/utils/method.js +4 -2
  41. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
+ const method = require("@/utils/method");
3
4
  const react = require("react");
4
5
  const antd = require("antd");
5
6
  const MyCheckbox = (props) => {
@@ -17,79 +18,25 @@ const MyCheckbox = (props) => {
17
18
  interfaceTypeSysDict,
18
19
  actionUrlKey,
19
20
  actionUrlExtraParams,
20
- langId
21
+ langConfig
21
22
  } = props;
22
- const { message } = antd.App.useApp();
23
23
  const [list, setList] = react.useState([]);
24
24
  const [val, setVal] = react.useState(value || []);
25
25
  react.useEffect(() => {
26
- if ((item == null ? void 0 : item.inputType) === "local") {
27
- const arr = (item == null ? void 0 : item.data) || [];
28
- setList(arr.map((v) => ({ value: v, label: v })));
29
- } else if ((item == null ? void 0 : item.inputType) === "dictionary") {
30
- getList(item.classify, interfaceTypeDict);
31
- } else if ((item == null ? void 0 : item.inputType) === "system-dictionary") {
32
- getList(item.classify, interfaceTypeSysDict);
33
- } else if ((item == null ? void 0 : item.inputType) === "url") {
34
- getUrlList();
35
- }
36
- }, [item == null ? void 0 : item.inputType]);
37
- const getList = async (id, interfaceType) => {
38
- var _a;
39
- if (!id) {
40
- return;
41
- }
42
- const res = await commonRequest(interfaceType, { asctypeid: id });
43
- if ((res == null ? void 0 : res.ReturnValue) === 1) {
44
- const arr = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) || [];
45
- setList(
46
- arr.map((v) => {
47
- const value2 = v.dicid + "-" + v.info;
48
- return { value: value2, label: value2 };
49
- })
50
- );
51
- }
52
- };
53
- const getUrlList = async () => {
54
- var _a, _b;
55
- try {
56
- const keyFieldList = ((_a = item == null ? void 0 : item["key-field"]) == null ? void 0 : _a.list) || [];
57
- const delimiter = ((_b = item == null ? void 0 : item["key-field"]) == null ? void 0 : _b.delimiter) || "";
58
- if (!keyFieldList.length) {
59
- message.error(langId === "10001" ? "请配置key-field" : "Please configure key-field");
60
- return;
61
- }
62
- const response = await commonRequestWidthParams(
63
- {
64
- PageName: "dns_relay",
65
- Controlname: "CallActionUrl",
66
- InterfaceType: ""
67
- },
68
- {
69
- [actionUrlKey]: item == null ? void 0 : item["action-url"],
70
- ...actionUrlExtraParams
71
- }
72
- );
73
- if (response == null ? void 0 : response.data) {
74
- const data = response == null ? void 0 : response.data;
75
- const list2 = data == null ? void 0 : data.list;
76
- let urlData = [];
77
- if (Array.isArray(data)) {
78
- urlData = data;
79
- }
80
- if (Array.isArray(list2)) {
81
- urlData = list2;
82
- }
83
- const urlOptions = urlData.map((val2) => ({
84
- label: handleUrlOptions(val2, delimiter, keyFieldList),
85
- value: handleUrlOptions(val2, delimiter, keyFieldList)
86
- }));
87
- setList([...urlOptions]);
88
- }
89
- } catch (error) {
90
- message.error(langId === "10001" ? "加载选项失败" : "Failed to load options");
91
- } finally {
92
- }
26
+ handleLoadOptions();
27
+ }, [item.inputType, item.classify, item.data, item.options]);
28
+ const handleLoadOptions = async () => {
29
+ const list2 = await method.handleSelectOptions({
30
+ commonRequestWidthParams,
31
+ commonRequest,
32
+ interfaceTypeDict,
33
+ interfaceTypeSysDict,
34
+ actionUrlKey,
35
+ actionUrlExtraParams,
36
+ item,
37
+ langConfig: langConfig || []
38
+ });
39
+ setList(list2);
93
40
  };
94
41
  return /* @__PURE__ */ jsxRuntime.jsx(
95
42
  antd.Checkbox.Group,
@@ -15,7 +15,7 @@ export interface IMYRadio {
15
15
  interfaceTypeSysDict: string;
16
16
  actionUrlKey: string;
17
17
  actionUrlExtraParams: object;
18
- langId?: string;
18
+ langConfig?: any[];
19
19
  }
20
20
  declare const MyRadio: (props: IMYRadio) => import("react/jsx-runtime").JSX.Element;
21
21
  export default MyRadio;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
+ const method = require("@/utils/method");
3
4
  const antd = require("antd");
4
5
  const react = require("react");
5
6
  const MyRadio = (props) => {
@@ -11,86 +12,29 @@ const MyRadio = (props) => {
11
12
  radioAlign = "horizontal",
12
13
  commonRequestWidthParams,
13
14
  commonRequest,
14
- handleUrlOptions,
15
15
  value,
16
16
  interfaceTypeDict,
17
17
  interfaceTypeSysDict,
18
18
  actionUrlKey,
19
19
  actionUrlExtraParams,
20
- langId
20
+ langConfig
21
21
  } = props;
22
- const { message } = antd.App.useApp();
23
22
  const [list, setList] = react.useState([]);
24
23
  react.useEffect(() => {
25
- if ((item == null ? void 0 : item.inputType) === "local") {
26
- const arr = (item == null ? void 0 : item.data) || [];
27
- setList(arr.map((v) => ({ value: v, label: v })));
28
- } else if ((item == null ? void 0 : item.inputType) === "dictionary") {
29
- getList(item.classify, interfaceTypeDict);
30
- } else if ((item == null ? void 0 : item.inputType) === "system-dictionary") {
31
- getList(item.classify, interfaceTypeSysDict);
32
- } else if ((item == null ? void 0 : item.inputType) === "url") {
33
- getUrlList();
34
- }
35
- }, [item == null ? void 0 : item.inputType]);
36
- const getList = async (id, interfaceType) => {
37
- var _a;
38
- if (!id) {
39
- return;
40
- }
41
- const res = await commonRequest(interfaceType, { asctypeid: id });
42
- if ((res == null ? void 0 : res.ReturnValue) === 1) {
43
- const arr = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) || [];
44
- setList(
45
- arr.map((v) => {
46
- const value2 = v.dicid + "-" + v.info;
47
- return { value: value2, label: value2 };
48
- })
49
- );
50
- }
51
- };
52
- const getUrlList = async () => {
53
- var _a, _b;
54
- try {
55
- const keyFieldList = ((_a = item == null ? void 0 : item["key-field"]) == null ? void 0 : _a.list) || [];
56
- const delimiter = ((_b = item == null ? void 0 : item["key-field"]) == null ? void 0 : _b.delimiter) || "";
57
- if (!keyFieldList.length) {
58
- message.error(langId === "10001" ? "请配置key-field" : "Please configure key-field");
59
- return;
60
- }
61
- if (!commonRequestWidthParams)
62
- return;
63
- const response = await commonRequestWidthParams(
64
- {
65
- PageName: "dns_relay",
66
- Controlname: "CallActionUrl",
67
- InterfaceType: ""
68
- },
69
- {
70
- [actionUrlKey]: item == null ? void 0 : item["action-url"],
71
- ...actionUrlExtraParams
72
- }
73
- );
74
- if (response == null ? void 0 : response.data) {
75
- const data = response == null ? void 0 : response.data;
76
- const list2 = data == null ? void 0 : data.list;
77
- let urlData = [];
78
- if (Array.isArray(data)) {
79
- urlData = data;
80
- }
81
- if (Array.isArray(list2)) {
82
- urlData = list2;
83
- }
84
- const urlOptions = urlData.map((val) => ({
85
- label: handleUrlOptions(val, delimiter, keyFieldList),
86
- value: handleUrlOptions(val, delimiter, keyFieldList)
87
- }));
88
- setList([...urlOptions]);
89
- }
90
- } catch (error) {
91
- message.error(langId === "10001" ? "加载选项失败" : "Failed to load options");
92
- } finally {
93
- }
24
+ handleLoadOptions();
25
+ }, [item.inputType, item.classify, item.data, item.options]);
26
+ const handleLoadOptions = async () => {
27
+ const list2 = await method.handleSelectOptions({
28
+ commonRequestWidthParams,
29
+ commonRequest,
30
+ interfaceTypeDict,
31
+ interfaceTypeSysDict,
32
+ actionUrlKey,
33
+ actionUrlExtraParams,
34
+ item,
35
+ langConfig
36
+ });
37
+ setList(list2);
94
38
  };
95
39
  return /* @__PURE__ */ jsxRuntime.jsx(
96
40
  antd.Radio.Group,
@@ -1,6 +1,6 @@
1
1
  import { Ijson } from '../index.d';
2
2
  import { AxiosResponse } from 'axios';
3
- declare const MySelect: ({ item, readonly, style, commonRequestWidthParams, commonRequest, value, onChange, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, }: {
3
+ declare const MySelect: ({ item, readonly, style, commonRequestWidthParams, commonRequest, value, onChange, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, langConfig, }: {
4
4
  item: Ijson;
5
5
  readonly?: boolean | undefined;
6
6
  style?: any;
@@ -13,5 +13,6 @@ declare const MySelect: ({ item, readonly, style, commonRequestWidthParams, comm
13
13
  actionUrlKey: string;
14
14
  actionUrlExtraParams: object;
15
15
  langId?: string | undefined;
16
+ langConfig?: any[] | undefined;
16
17
  }) => import("react/jsx-runtime").JSX.Element;
17
18
  export default MySelect;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const method = require("../../../utils/method");
3
+ const method = require("@/utils/method");
4
4
  const func = require("../func");
5
5
  const react = require("react");
6
6
  const antd = require("antd");
@@ -16,7 +16,8 @@ const MySelect = ({
16
16
  interfaceTypeSysDict,
17
17
  actionUrlKey,
18
18
  actionUrlExtraParams,
19
- langId
19
+ langId,
20
+ langConfig
20
21
  }) => {
21
22
  const [options, setOptions] = react.useState([]);
22
23
  const [loading, setLoading] = react.useState(false);
@@ -32,7 +33,8 @@ const MySelect = ({
32
33
  interfaceTypeSysDict,
33
34
  actionUrlKey,
34
35
  actionUrlExtraParams,
35
- item
36
+ item,
37
+ langConfig: langConfig || []
36
38
  });
37
39
  setOptions(list);
38
40
  setLoading(false);
@@ -18,6 +18,7 @@ interface IDynamicFormProps {
18
18
  isEdit?: boolean;
19
19
  formShowType?: 'form' | 'table';
20
20
  langId?: string;
21
+ langConfig?: any[];
21
22
  }
22
23
  type NestedFormListFieldData = FormListFieldData & {
23
24
  parentName?: (string | number)[];
@@ -31,7 +31,8 @@ function useDynamicForm(props) {
31
31
  CustomModalComponent,
32
32
  isEdit,
33
33
  formShowType = "form",
34
- langId
34
+ langId,
35
+ langConfig = []
35
36
  } = props;
36
37
  const formConfigRef = react.useRef([]);
37
38
  const { message } = antd.App.useApp();
@@ -139,7 +140,7 @@ function useDynamicForm(props) {
139
140
  var _a, _b, _c, _d, _e;
140
141
  return /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 10, vertical: instructionShowMode === "flex", align: "center", children: [
141
142
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: itemWithJson.attrname }),
142
- ((_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a.instruction) && instructionShowMode === "icon" && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: (_b = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _b.instruction, children: /* @__PURE__ */ jsxRuntime.jsx(
143
+ ((_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a.instruction) && instructionShowMode === "icon" && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: func.getTitle(langConfig, (_b = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _b.instruction), children: /* @__PURE__ */ jsxRuntime.jsx(
143
144
  icons.InfoCircleOutlined,
144
145
  {
145
146
  style: {
@@ -148,7 +149,7 @@ function useDynamicForm(props) {
148
149
  cursor: "pointer"
149
150
  }
150
151
  }
151
- ) }) || /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: ((_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["instruction-color"]) ?? "red" }, children: (_e = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _e.instruction })
152
+ ) }) || /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: ((_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["instruction-color"]) ?? "red" }, children: func.getTitle(langConfig, (_e = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _e.instruction) })
152
153
  ] });
153
154
  };
154
155
  const renderNestedFormList = react.useCallback(
@@ -241,7 +242,10 @@ function useDynamicForm(props) {
241
242
  field.key
242
243
  );
243
244
  }),
244
- !isEdit && /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { style: { width: 200 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "dashed", onClick: () => add(), block: true, children: "+ 新增" }) })
245
+ !isEdit && /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { style: { width: 200 }, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Button, { type: "dashed", onClick: () => add(), block: true, children: [
246
+ "+ ",
247
+ langId === "10001" ? "新增" : "Add"
248
+ ] }) })
245
249
  ] })
246
250
  }
247
251
  )
@@ -292,7 +296,7 @@ function useDynamicForm(props) {
292
296
  }
293
297
  if (itemWithJson.attrtype === 0) {
294
298
  const initialValue = func.handleSetFormItemInitialValue(itemWithJson);
295
- const message2 = (_b = itemWithJson.json) == null ? void 0 : _b["default-prompt"];
299
+ const message2 = func.getTitle(langConfig, (_b = itemWithJson.json) == null ? void 0 : _b["default-prompt"]);
296
300
  const placeholder = func.handleGetPlaceholder(itemWithJson, langId);
297
301
  const { combinations = [] } = itemWithJson.json || {};
298
302
  if (combinations == null ? void 0 : combinations.length) {
@@ -334,7 +338,7 @@ function useDynamicForm(props) {
334
338
  ...((_c2 = itemWithJson.json) == null ? void 0 : _c2.regexp) ? [
335
339
  {
336
340
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
337
- message: ((_d2 = itemWithJson.json) == null ? void 0 : _d2["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
341
+ message: func.getTitle(langConfig, (_d2 = itemWithJson.json) == null ? void 0 : _d2["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
338
342
  }
339
343
  ] : []
340
344
  ],
@@ -374,7 +378,7 @@ function useDynamicForm(props) {
374
378
  ...((_f = itemWithJson.json) == null ? void 0 : _f.regexp) ? [
375
379
  {
376
380
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
377
- message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
381
+ message: func.getTitle(langConfig, (_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
378
382
  }
379
383
  ] : []
380
384
  ],
@@ -408,7 +412,7 @@ function useDynamicForm(props) {
408
412
  data
409
413
  );
410
414
  if ((result == null ? void 0 : result.ReturnValue) !== 1) {
411
- message.error((result == null ? void 0 : result.msg) || "删除文件失败");
415
+ message.error(result == null ? void 0 : result.msg);
412
416
  return false;
413
417
  }
414
418
  } else {
@@ -416,7 +420,6 @@ function useDynamicForm(props) {
416
420
  }
417
421
  return true;
418
422
  } catch (error) {
419
- message.error("删除文件失败,请重试");
420
423
  return false;
421
424
  }
422
425
  };
@@ -435,7 +438,7 @@ function useDynamicForm(props) {
435
438
  const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
436
439
  const attrid = item.attrid;
437
440
  const formatValue = func.handleSetFormItemInitialValue(item);
438
- const message2 = ((_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
441
+ const message2 = func.getTitle(langConfig, (_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
439
442
  const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
440
443
  const placeholder = func.handleGetPlaceholder(item, langId);
441
444
  const params = item.json.length && {
@@ -518,6 +521,7 @@ function useDynamicForm(props) {
518
521
  actionUrlKey,
519
522
  actionUrlExtraParams,
520
523
  langId,
524
+ langConfig,
521
525
  onChange: (val) => {
522
526
  form.setFieldValue(item.attrid, val);
523
527
  }
@@ -623,7 +627,7 @@ function useDynamicForm(props) {
623
627
  interfaceTypeSysDict,
624
628
  actionUrlKey,
625
629
  actionUrlExtraParams,
626
- langId,
630
+ langConfig,
627
631
  onChange: (e) => {
628
632
  form.setFieldValue(item.attrid, e.target.value);
629
633
  }
@@ -645,7 +649,6 @@ function useDynamicForm(props) {
645
649
  interfaceTypeSysDict,
646
650
  actionUrlKey,
647
651
  actionUrlExtraParams,
648
- langId,
649
652
  onChange: (val) => {
650
653
  form.setFieldValue(item.attrid, val.join(","));
651
654
  }
@@ -12,11 +12,6 @@ export declare const disabledDate: RangePickerProps['disabledDate'];
12
12
  * 将URL中的指定字段拼接为字符串
13
13
  */
14
14
  export declare const handleUrlOptions: (val: any, delimiter: string, list: any[]) => string;
15
- /**
16
- * 根据配置处理成下拉数据
17
- * @param param0
18
- * @returns
19
- */
20
15
  /**
21
16
  * attrList 格式的单层数组 处理成对象{attrid:attrname}
22
17
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const reactVant = require("react-vant");
4
- const method = require("../../../utils/method");
4
+ const method = require("@/utils/method");
5
5
  const react = require("react");
6
6
  const antd = require("antd");
7
7
  const checkboxGroup = "index-module_checkbox-group_4684b";
@@ -210,7 +210,7 @@ function useUniversalTable() {
210
210
  dataIndex: (item == null ? void 0 : item["header-attribute-id"]) || "",
211
211
  width: isDefaultWidth ? (item == null ? void 0 : item["header-width"]) || 180 : void 0,
212
212
  render: (text) => {
213
- if (text && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
213
+ if (text && text && typeof text === "string" && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
214
214
  try {
215
215
  const items = JSON.parse(text);
216
216
  if (items == null ? void 0 : items.length) {
package/lib/index.js CHANGED
@@ -14,21 +14,28 @@ const index = "";
14
14
  const tableDetail = "";
15
15
  dayjs.locale("zh-cn");
16
16
  const Demo = () => {
17
- react.useEffect(() => {
18
- method.handleAttrListToObj(mock.attrList);
19
- }, []);
20
17
  const formRef = react.useRef(null);
21
18
  const [form] = antd.Form.useForm();
22
- const onFinish = async (values) => {
23
- return;
19
+ const [list, setList] = react.useState(method.handleAttrList(mock.attrList));
20
+ const onValuesChange = async (values, allValues) => {
21
+ const keys = Object.keys(values);
22
+ if (keys.includes("6A5984BD547449088172BD33F2A965E8")) {
23
+ list.forEach((item) => {
24
+ if (item.attrid === "4E507938BE7448E5883CFCD9C962707D") {
25
+ item.json.data = ["1", "2", "3"];
26
+ item.info = JSON.stringify(item == null ? void 0 : item.json);
27
+ }
28
+ });
29
+ setList([...list]);
30
+ }
24
31
  };
25
32
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
26
33
  /* @__PURE__ */ jsxRuntime.jsx(main.BackHeader, { title: "页头组件", isBack: true }),
27
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: {}, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, onFinish, children: [
34
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {}, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, onValuesChange, children: [
28
35
  /* @__PURE__ */ jsxRuntime.jsx(
29
36
  main.DynamicForm,
30
37
  {
31
- formConfig: method.handleAttrList(mock.attrList),
38
+ formConfig: list,
32
39
  readonly: false,
33
40
  form,
34
41
  relatedid: "guid",
@@ -39,8 +46,8 @@ const Demo = () => {
39
46
  commonRequest: services.commonRequest,
40
47
  instructionShowMode: "icon",
41
48
  ref: formRef,
42
- formShowType: "table",
43
- langId: "10002"
49
+ langId: "10001",
50
+ langConfig: mock.langConfig
44
51
  }
45
52
  ),
46
53
  /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "submit", style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", htmlType: "submit", children: "提交" }) })
@@ -1,2 +1,16 @@
1
1
  export declare const baseAttrList: never[];
2
2
  export declare const attrList: any;
3
+ export declare const langConfig: {
4
+ xh: string;
5
+ lanid: string;
6
+ sysid: string;
7
+ sysname: string;
8
+ systype: string;
9
+ pageid: string;
10
+ pageinfo: string;
11
+ dataid: string;
12
+ datainfo: string;
13
+ dicid: string;
14
+ info: string;
15
+ content: string;
16
+ }[];