szld-libs 0.3.22 → 0.3.24

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.
@@ -57,9 +57,9 @@ const DynamicForm = forwardRef((props, ref) => {
57
57
  return delFileListRef.current;
58
58
  }
59
59
  }));
60
- return /* @__PURE__ */ jsx(Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsx(Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxs(Flex, { className: "custom-form-body", children: [
61
- /* @__PURE__ */ jsxs("div", { className: "custom-form-list", children: [
62
- /* @__PURE__ */ jsx(Flex, { align: "center", style: { position: "relative" }, children: /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
60
+ return /* @__PURE__ */ jsx(Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsx(Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsx(Flex, { className: "custom-form-body", children: /* @__PURE__ */ jsxs("div", { className: "custom-form-list", children: [
61
+ /* @__PURE__ */ jsxs(Flex, { align: "center", style: { position: "relative", backgroundColor: "#004d32" }, children: [
62
+ /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
63
63
  var _a, _b;
64
64
  const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
65
65
  return /* @__PURE__ */ jsxs(
@@ -77,8 +77,11 @@ const DynamicForm = forwardRef((props, ref) => {
77
77
  },
78
78
  index
79
79
  );
80
- }) }) }),
81
- fields.map((field) => /* @__PURE__ */ jsx(Flex, { align: "center", className: "custom-form-list-item-container", children: /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
80
+ }) }),
81
+ /* @__PURE__ */ jsx("a", { className: "custom-form-list-add-btn", onClick: () => add(), children: langId === "10001" ? "新增" : "Add" })
82
+ ] }),
83
+ fields.map((field) => /* @__PURE__ */ jsxs(Flex, { align: "center", className: "custom-form-list-item-container", children: [
84
+ /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
82
85
  var _a, _b;
83
86
  const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
84
87
  return /* @__PURE__ */ jsx(
@@ -107,13 +110,10 @@ const DynamicForm = forwardRef((props, ref) => {
107
110
  },
108
111
  child.attrid || `child-${index}`
109
112
  );
110
- }) }) }, field.key))
111
- ] }),
112
- /* @__PURE__ */ jsxs(Flex, { className: "custom-form-list-right", vertical: true, children: [
113
- /* @__PURE__ */ jsx("a", { className: "custom-form-list-add-btn", onClick: () => add(), children: langId === "10001" ? "新增" : "Add" }),
114
- fields.map((field) => /* @__PURE__ */ jsx("a", { className: "custom-form-list-del-btn", onClick: () => remove(field.key), children: langId === "10001" ? "删除" : "Delete" }))
115
- ] })
116
- ] }) }) : /* @__PURE__ */ jsx(Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsx(Fragment$1, { children: handleRenderItem({
113
+ }) }),
114
+ /* @__PURE__ */ jsx("a", { className: "custom-form-list-del-btn", onClick: () => remove(field.key), children: langId === "10001" ? "删除" : "Delete" })
115
+ ] }, field.key))
116
+ ] }) }) }) : /* @__PURE__ */ jsx(Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsx(Fragment$1, { children: handleRenderItem({
117
117
  item,
118
118
  readonly,
119
119
  colNum,
@@ -429,18 +429,19 @@ function useDynamicForm(props) {
429
429
  defaultWidth = 358,
430
430
  customWidth = {}
431
431
  }) => {
432
- var _a, _b, _c, _d, _e;
432
+ var _a, _b, _c, _d, _e, _f;
433
433
  const mode = item.json.input || "text";
434
+ const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
434
435
  const attrid = item.attrid;
435
436
  const formatValue = handleSetFormItemInitialValue(item);
436
- const message2 = ((_a = item.json) == null ? void 0 : _a["default-prompt"]) || "";
437
- const disableDateGoover = ((_b = item.json) == null ? void 0 : _b["disable-date-goover"]) || false;
437
+ const message2 = ((_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
438
+ const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
438
439
  const placeholder = handleGetPlaceholder(item, langId);
439
440
  const params = item.json.length && {
440
441
  maxLength: item.json.length
441
442
  } || {};
442
443
  const itemStyle = formItemStyle.find((v) => v.type === mode);
443
- let inputWidth = (_c = item.json) == null ? void 0 : _c["input-width"];
444
+ let inputWidth = (_d = item.json) == null ? void 0 : _d["input-width"];
444
445
  if (inputWidth) {
445
446
  inputWidth = formShowType === "table" ? Number(inputWidth) - 32 : inputWidth;
446
447
  }
@@ -451,7 +452,7 @@ function useDynamicForm(props) {
451
452
  Input,
452
453
  {
453
454
  disabled: true,
454
- value: ((_d = item.json) == null ? void 0 : _d["label-value"]) || item.attrvalue || ((_e = item.json) == null ? void 0 : _e.default) || "-",
455
+ value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
455
456
  style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
456
457
  }
457
458
  );
@@ -585,6 +586,7 @@ function useDynamicForm(props) {
585
586
  DatePicker,
586
587
  {
587
588
  showTime: mode === "time-picker",
589
+ format: format ? format : void 0,
588
590
  picker: pickerObj[mode] || "date",
589
591
  disabled: readonly,
590
592
  disabledDate: disabledDateFunc,
@@ -11,7 +11,7 @@ interface IAttrSetDetailRendererProps {
11
11
  imgHeight?: number;
12
12
  layoutType?: 'row' | 'flex';
13
13
  }
14
- export default function useAttrSetDetailRenderer({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
14
+ export default function useDetailRender({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
15
15
  renderDetail: ({ attrList, detailList, span, type, universalHeader, beforeExtraValue, operationColumn, }: {
16
16
  attrList?: any[] | undefined;
17
17
  detailList?: any[] | undefined;
@@ -4,7 +4,7 @@ import { App, Row, Col, Flex, Table, Space, Image } from "antd";
4
4
  import { handleSetTableRowColor } from "../utils/szxkFunc";
5
5
  import { useMemoizedFn } from "ahooks";
6
6
  import { Fragment } from "react";
7
- function useAttrSetDetailRenderer({
7
+ function useDetailRender({
8
8
  labelSpan = 3,
9
9
  valueSpan = 9,
10
10
  imgWidth = 93,
@@ -200,5 +200,5 @@ function useAttrSetDetailRenderer({
200
200
  return { renderDetail };
201
201
  }
202
202
  export {
203
- useAttrSetDetailRenderer as default
203
+ useDetailRender as default
204
204
  };
package/es/index.css CHANGED
@@ -1,10 +1,10 @@
1
1
 
2
2
  .custom-form-body {
3
- width: 1236px;
3
+ width: 1300;
4
4
  }
5
5
  .custom-form-body .custom-form-list {
6
6
  position: relative;
7
- width: 1188px;
7
+ width: 1300px;
8
8
  overflow-x: auto;
9
9
  background-color: #004d32;
10
10
  }
@@ -25,10 +25,18 @@
25
25
  .custom-form-body .custom-form-list .custom-form-list-header-item:first-child {
26
26
  margin-left: 14px;
27
27
  }
28
+ .custom-form-body .custom-form-list .custom-form-list-item-container {
29
+ position: relative;
30
+ }
28
31
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item {
29
32
  width: fit-content;
30
- min-width: 100%;
33
+ min-width: fit-content;
31
34
  /* 确保至少占满可视区域 */
35
+ min-height: 48px;
36
+ height: auto;
37
+ /* 或者 100%,确保高度撑满 */
38
+ display: flex;
39
+ align-items: center;
32
40
  }
33
41
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item .custom-form-list-item-content {
34
42
  min-height: 48px;
@@ -39,9 +47,15 @@
39
47
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item .custom-form-list-item-content .ant-form-item-control-input-content:nth-child(1) {
40
48
  margin-left: 14px;
41
49
  }
50
+ .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item {
51
+ background: #d6e2de !important;
52
+ }
42
53
  .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item .custom-form-list-item-content {
43
54
  background: #d6e2de !important;
44
55
  }
56
+ .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(odd) .custom-form-list-item {
57
+ background-color: #c2d4ce !important;
58
+ }
45
59
  .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(odd) .custom-form-list-item .custom-form-list-item-content {
46
60
  background-color: #c2d4ce !important;
47
61
  }
@@ -51,19 +65,31 @@
51
65
  width: 48px;
52
66
  height: 48px;
53
67
  line-height: 48px;
54
- text-align: center;
68
+ display: flex;
69
+ flex-direction: row-reverse;
70
+ flex-shrink: 0;
71
+ position: sticky;
72
+ text-decoration: underline;
73
+ text-align: right;
74
+ right: 0;
75
+ top: 0;
55
76
  }
56
77
  .custom-form-body .custom-form-list-del-btn {
57
- display: inline-block;
58
78
  background: #fff;
59
79
  width: 48px;
60
- height: 48px;
61
80
  line-height: 48px;
62
81
  text-align: center;
63
82
  color: #dc0000;
83
+ display: flex;
84
+ flex-direction: row-reverse;
85
+ align-items: center;
86
+ align-self: stretch;
87
+ /* 关键:让按钮高度填满父容器 */
64
88
  flex-shrink: 0;
65
- }
66
- .custom-form-body .custom-form-list-right {
67
- width: 48;
68
- background-color: '#fff';
89
+ position: sticky;
90
+ text-decoration: underline;
91
+ text-align: right;
92
+ right: 0;
93
+ top: 0;
94
+ bottom: 0;
69
95
  }
package/es/mock/index.js CHANGED
@@ -2,45 +2,111 @@ const baseAttrList = [];
2
2
  const attrList = [
3
3
  {
4
4
  xh: 1,
5
- asid: "DC6FAFA331D84484BCE19E21738AD767",
5
+ asid: "06C6CE201AB44B2CAAB11C753374AA40",
6
6
  astype: 0,
7
- tname: "fjffjc_table2",
8
- attrid: "B3C4795F7CA849CD839539249F74BCE3",
9
- attrname: "How Many times",
7
+ tname: "tsyy_table2",
8
+ attrid: "30BDE6E7977E40069B55DDE61C8795AE",
9
+ attrname: "Dates",
10
10
  attrtype: 0,
11
- info: '{"input":"text","dataType":"string","length":100,"input-width":396,"default":1}',
11
+ info: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
12
12
  info_base64: 0,
13
- createtime: "2026-02-11 15:14:14",
13
+ createtime: "2026-02-11 15:12:26",
14
14
  attrvalue: "",
15
15
  serialnum: 1,
16
16
  children: [],
17
17
  json: {
18
- input: "text",
18
+ input: "multiple-date-picker",
19
+ "range-picker-save": "single",
19
20
  dataType: "string",
20
- length: 100,
21
- "input-width": 396,
22
- default: 1
21
+ length: 1e3,
22
+ "input-width": 240,
23
+ must: true
23
24
  }
24
25
  },
25
26
  {
26
27
  xh: 2,
27
- asid: "DC6FAFA331D84484BCE19E21738AD767",
28
+ asid: "06C6CE201AB44B2CAAB11C753374AA40",
28
29
  astype: 0,
29
- tname: "fjffjc_table2",
30
- attrid: "2A08BD562A9A48E3843A59D6396E2F21",
31
- attrname: "what time?",
30
+ tname: "tsyy_table2",
31
+ attrid: "38A7DADC6D64492D83DA607EC121A02D",
32
+ attrname: "How Many Times",
32
33
  attrtype: 0,
33
- info: '{"input":"text","dataType":"string","length":100,"input-width":396}',
34
+ info: '{"input":"text","dataType":"string","length":10,"input-width":140,"must":true}',
34
35
  info_base64: 0,
35
- createtime: "2026-02-11 15:14:14",
36
+ createtime: "2026-02-11 15:12:26",
37
+ attrvalue: "",
38
+ serialnum: 2,
39
+ children: [],
40
+ json: {
41
+ input: "text",
42
+ dataType: "string",
43
+ length: 10,
44
+ "input-width": 140,
45
+ must: true
46
+ }
47
+ },
48
+ {
49
+ xh: 3,
50
+ asid: "06C6CE201AB44B2CAAB11C753374AA40",
51
+ astype: 0,
52
+ tname: "tsyy_table2",
53
+ attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
54
+ attrname: "Feeding Time",
55
+ attrtype: 0,
56
+ info: '{\r\n "input": "second-picker",\r\n "dataType": "string",\r\n "length": 200,\r\n "input-width": 240,\r\n "format": "HH:mm"\r\n}',
57
+ info_base64: 0,
58
+ createtime: "2026-02-11 15:12:26",
36
59
  attrvalue: "",
37
60
  serialnum: 3,
38
61
  children: [],
62
+ json: {
63
+ input: "second-picker",
64
+ dataType: "string",
65
+ length: 200,
66
+ "input-width": 240,
67
+ format: "HH:mm"
68
+ }
69
+ },
70
+ {
71
+ xh: 4,
72
+ asid: "06C6CE201AB44B2CAAB11C753374AA40",
73
+ astype: 0,
74
+ tname: "tsyy_table2",
75
+ attrid: "665F59E637664037939512C9877EAD75",
76
+ attrname: "Meds Info",
77
+ attrtype: 0,
78
+ info: '{"input":"text","dataType":"string","length":500,"input-width":240}',
79
+ info_base64: 0,
80
+ createtime: "2026-02-11 15:12:26",
81
+ attrvalue: "",
82
+ serialnum: 4,
83
+ children: [],
84
+ json: {
85
+ input: "text",
86
+ dataType: "string",
87
+ length: 500,
88
+ "input-width": 240
89
+ }
90
+ },
91
+ {
92
+ xh: 5,
93
+ asid: "06C6CE201AB44B2CAAB11C753374AA40",
94
+ astype: 0,
95
+ tname: "tsyy_table2",
96
+ attrid: "290CF33D2AAD45399987987FAB80900B",
97
+ attrname: "Feeding Instruction",
98
+ attrtype: 0,
99
+ info: '{"input":"text","dataType":"string","length":500,"input-width":340}',
100
+ info_base64: 0,
101
+ createtime: "2026-02-11 15:12:26",
102
+ attrvalue: "",
103
+ serialnum: 5,
104
+ children: [],
39
105
  json: {
40
106
  input: "text",
41
107
  dataType: "string",
42
- length: 100,
43
- "input-width": 396
108
+ length: 500,
109
+ "input-width": 340
44
110
  }
45
111
  }
46
112
  ];
@@ -58,9 +58,9 @@ const DynamicForm = react.forwardRef((props, ref) => {
58
58
  return delFileListRef.current;
59
59
  }
60
60
  }));
61
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { className: "custom-form-body", children: [
62
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "custom-form-list", children: [
63
- /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", style: { position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
61
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-body", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "custom-form-list", children: [
62
+ /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", style: { position: "relative", backgroundColor: "#004d32" }, children: [
63
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
64
64
  var _a, _b;
65
65
  const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
66
66
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -78,8 +78,11 @@ const DynamicForm = react.forwardRef((props, ref) => {
78
78
  },
79
79
  index
80
80
  );
81
- }) }) }),
82
- fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", className: "custom-form-list-item-container", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
81
+ }) }),
82
+ /* @__PURE__ */ jsxRuntime.jsx("a", { className: "custom-form-list-add-btn", onClick: () => add(), children: langId === "10001" ? "新增" : "Add" })
83
+ ] }),
84
+ fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", className: "custom-form-list-item-container", children: [
85
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
83
86
  var _a, _b;
84
87
  const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
85
88
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -108,13 +111,10 @@ const DynamicForm = react.forwardRef((props, ref) => {
108
111
  },
109
112
  child.attrid || `child-${index}`
110
113
  );
111
- }) }) }, field.key))
112
- ] }),
113
- /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { className: "custom-form-list-right", vertical: true, children: [
114
- /* @__PURE__ */ jsxRuntime.jsx("a", { className: "custom-form-list-add-btn", onClick: () => add(), children: langId === "10001" ? "新增" : "Add" }),
115
- fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx("a", { className: "custom-form-list-del-btn", onClick: () => remove(field.key), children: langId === "10001" ? "删除" : "Delete" }))
116
- ] })
117
- ] }) }) : /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: handleRenderItem({
114
+ }) }),
115
+ /* @__PURE__ */ jsxRuntime.jsx("a", { className: "custom-form-list-del-btn", onClick: () => remove(field.key), children: langId === "10001" ? "删除" : "Delete" })
116
+ ] }, field.key))
117
+ ] }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: handleRenderItem({
118
118
  item,
119
119
  readonly,
120
120
  colNum,
@@ -430,18 +430,19 @@ function useDynamicForm(props) {
430
430
  defaultWidth = 358,
431
431
  customWidth = {}
432
432
  }) => {
433
- var _a, _b, _c, _d, _e;
433
+ var _a, _b, _c, _d, _e, _f;
434
434
  const mode = item.json.input || "text";
435
+ const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
435
436
  const attrid = item.attrid;
436
437
  const formatValue = func.handleSetFormItemInitialValue(item);
437
- const message2 = ((_a = item.json) == null ? void 0 : _a["default-prompt"]) || "";
438
- const disableDateGoover = ((_b = item.json) == null ? void 0 : _b["disable-date-goover"]) || false;
438
+ const message2 = ((_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
439
+ const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
439
440
  const placeholder = func.handleGetPlaceholder(item, langId);
440
441
  const params = item.json.length && {
441
442
  maxLength: item.json.length
442
443
  } || {};
443
444
  const itemStyle = formItemStyle.find((v) => v.type === mode);
444
- let inputWidth = (_c = item.json) == null ? void 0 : _c["input-width"];
445
+ let inputWidth = (_d = item.json) == null ? void 0 : _d["input-width"];
445
446
  if (inputWidth) {
446
447
  inputWidth = formShowType === "table" ? Number(inputWidth) - 32 : inputWidth;
447
448
  }
@@ -452,7 +453,7 @@ function useDynamicForm(props) {
452
453
  antd.Input,
453
454
  {
454
455
  disabled: true,
455
- value: ((_d = item.json) == null ? void 0 : _d["label-value"]) || item.attrvalue || ((_e = item.json) == null ? void 0 : _e.default) || "-",
456
+ value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
456
457
  style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
457
458
  }
458
459
  );
@@ -586,6 +587,7 @@ function useDynamicForm(props) {
586
587
  antd.DatePicker,
587
588
  {
588
589
  showTime: mode === "time-picker",
590
+ format: format ? format : void 0,
589
591
  picker: pickerObj[mode] || "date",
590
592
  disabled: readonly,
591
593
  disabledDate: disabledDateFunc,
@@ -11,7 +11,7 @@ interface IAttrSetDetailRendererProps {
11
11
  imgHeight?: number;
12
12
  layoutType?: 'row' | 'flex';
13
13
  }
14
- export default function useAttrSetDetailRenderer({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
14
+ export default function useDetailRender({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
15
15
  renderDetail: ({ attrList, detailList, span, type, universalHeader, beforeExtraValue, operationColumn, }: {
16
16
  attrList?: any[] | undefined;
17
17
  detailList?: any[] | undefined;
@@ -5,7 +5,7 @@ const antd = require("antd");
5
5
  const szxkFunc = require("../utils/szxkFunc");
6
6
  const ahooks = require("ahooks");
7
7
  const react = require("react");
8
- function useAttrSetDetailRenderer({
8
+ function useDetailRender({
9
9
  labelSpan = 3,
10
10
  valueSpan = 9,
11
11
  imgWidth = 93,
@@ -200,4 +200,4 @@ function useAttrSetDetailRenderer({
200
200
  );
201
201
  return { renderDetail };
202
202
  }
203
- module.exports = useAttrSetDetailRenderer;
203
+ module.exports = useDetailRender;
package/lib/index.css CHANGED
@@ -1,10 +1,10 @@
1
1
 
2
2
  .custom-form-body {
3
- width: 1236px;
3
+ width: 1300;
4
4
  }
5
5
  .custom-form-body .custom-form-list {
6
6
  position: relative;
7
- width: 1188px;
7
+ width: 1300px;
8
8
  overflow-x: auto;
9
9
  background-color: #004d32;
10
10
  }
@@ -25,10 +25,18 @@
25
25
  .custom-form-body .custom-form-list .custom-form-list-header-item:first-child {
26
26
  margin-left: 14px;
27
27
  }
28
+ .custom-form-body .custom-form-list .custom-form-list-item-container {
29
+ position: relative;
30
+ }
28
31
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item {
29
32
  width: fit-content;
30
- min-width: 100%;
33
+ min-width: fit-content;
31
34
  /* 确保至少占满可视区域 */
35
+ min-height: 48px;
36
+ height: auto;
37
+ /* 或者 100%,确保高度撑满 */
38
+ display: flex;
39
+ align-items: center;
32
40
  }
33
41
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item .custom-form-list-item-content {
34
42
  min-height: 48px;
@@ -39,9 +47,15 @@
39
47
  .custom-form-body .custom-form-list .custom-form-list-item-container .custom-form-list-item .custom-form-list-item-content .ant-form-item-control-input-content:nth-child(1) {
40
48
  margin-left: 14px;
41
49
  }
50
+ .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item {
51
+ background: #d6e2de !important;
52
+ }
42
53
  .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item .custom-form-list-item-content {
43
54
  background: #d6e2de !important;
44
55
  }
56
+ .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(odd) .custom-form-list-item {
57
+ background-color: #c2d4ce !important;
58
+ }
45
59
  .custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(odd) .custom-form-list-item .custom-form-list-item-content {
46
60
  background-color: #c2d4ce !important;
47
61
  }
@@ -51,19 +65,31 @@
51
65
  width: 48px;
52
66
  height: 48px;
53
67
  line-height: 48px;
54
- text-align: center;
68
+ display: flex;
69
+ flex-direction: row-reverse;
70
+ flex-shrink: 0;
71
+ position: sticky;
72
+ text-decoration: underline;
73
+ text-align: right;
74
+ right: 0;
75
+ top: 0;
55
76
  }
56
77
  .custom-form-body .custom-form-list-del-btn {
57
- display: inline-block;
58
78
  background: #fff;
59
79
  width: 48px;
60
- height: 48px;
61
80
  line-height: 48px;
62
81
  text-align: center;
63
82
  color: #dc0000;
83
+ display: flex;
84
+ flex-direction: row-reverse;
85
+ align-items: center;
86
+ align-self: stretch;
87
+ /* 关键:让按钮高度填满父容器 */
64
88
  flex-shrink: 0;
65
- }
66
- .custom-form-body .custom-form-list-right {
67
- width: 48;
68
- background-color: '#fff';
89
+ position: sticky;
90
+ text-decoration: underline;
91
+ text-align: right;
92
+ right: 0;
93
+ top: 0;
94
+ bottom: 0;
69
95
  }