szld-libs 0.3.21 → 0.3.23
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 +14376 -14161
- package/dist/szld-components.umd.js +47 -47
- package/es/components/DynamicForm/index.js +12 -12
- package/es/hooks/useDetailRender.d.ts +13 -7
- package/es/hooks/useDetailRender.js +162 -83
- package/es/index.css +35 -9
- package/es/mock/index.js +83 -18
- package/lib/components/DynamicForm/index.js +12 -12
- package/lib/hooks/useDetailRender.d.ts +13 -7
- package/lib/hooks/useDetailRender.js +160 -81
- package/lib/index.css +35 -9
- package/lib/mock/index.js +83 -18
- package/package.json +1 -1
- package/es/hooks/useRenderAttrSetDetail.d.ts +0 -25
- package/es/hooks/useRenderAttrSetDetail.js +0 -204
- package/lib/hooks/useRenderAttrSetDetail.d.ts +0 -25
- package/lib/hooks/useRenderAttrSetDetail.js +0 -203
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const method = require("szld-libs/lib/utils/method");
|
|
3
4
|
const antd = require("antd");
|
|
5
|
+
const szxkFunc = require("../utils/szxkFunc");
|
|
6
|
+
const ahooks = require("ahooks");
|
|
4
7
|
const react = require("react");
|
|
5
|
-
function
|
|
6
|
-
detailInfo,
|
|
8
|
+
function useDetailRender({
|
|
7
9
|
labelSpan = 3,
|
|
8
10
|
valueSpan = 9,
|
|
9
11
|
imgWidth = 93,
|
|
10
12
|
imgHeight = 93,
|
|
11
|
-
|
|
12
|
-
mainApplicationDomain = ""
|
|
13
|
+
layoutType = "row"
|
|
13
14
|
}) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const { message } = antd.App.useApp();
|
|
16
|
+
const renderRadioCardAttr = (item, span) => {
|
|
17
|
+
try {
|
|
18
|
+
const attrvalue = JSON.parse((item == null ? void 0 : item.attrvalue) || "{}") || "";
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
20
|
+
layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
|
|
22
|
+
item == null ? void 0 : item.attrname,
|
|
23
|
+
":"
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { wordWrap: "break-word" }, children: attrvalue == null ? void 0 : attrvalue.typename })
|
|
26
|
+
] }) }),
|
|
27
|
+
layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: item == null ? void 0 : item.attrvalue })
|
|
30
|
+
] })
|
|
31
|
+
] }, item == null ? void 0 : item.attrid);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
message.error("房型数据格式错误,转json失败");
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
17
36
|
};
|
|
18
|
-
const renderImageAttr = (item) => {
|
|
37
|
+
const renderImageAttr = (item, span) => {
|
|
19
38
|
if (typeof (item == null ? void 0 : item.attrvalue) !== "string")
|
|
20
39
|
return;
|
|
21
40
|
const attrvalues = JSON.parse((item == null ? void 0 : item.attrvalue) || "[]");
|
|
22
|
-
const
|
|
41
|
+
const valueNode = () => /* @__PURE__ */ jsxRuntime.jsx(antd.Space, { wrap: true, children: attrvalues.map((el, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23
42
|
"div",
|
|
24
43
|
{
|
|
25
44
|
style: {
|
|
@@ -34,91 +53,151 @@ function useDetailRenderer({
|
|
|
34
53
|
height: imgHeight,
|
|
35
54
|
src: el == null ? void 0 : el.FilePath,
|
|
36
55
|
alt: (item == null ? void 0 : item.attrname) || "-"
|
|
37
|
-
}
|
|
38
|
-
index
|
|
56
|
+
}
|
|
39
57
|
)
|
|
40
58
|
},
|
|
41
59
|
index
|
|
42
60
|
)) });
|
|
43
|
-
if (!useGrid) {
|
|
44
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Col, { span: labelSpan, children: [
|
|
45
|
-
item == null ? void 0 : item.attrname,
|
|
46
|
-
":",
|
|
47
|
-
renderItem
|
|
48
|
-
] }) }, item.attrid);
|
|
49
|
-
}
|
|
50
61
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
|
|
64
|
+
item == null ? void 0 : item.attrname,
|
|
65
|
+
":"
|
|
66
|
+
] }),
|
|
67
|
+
valueNode()
|
|
68
|
+
] }) }),
|
|
69
|
+
layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: valueNode() })
|
|
72
|
+
] })
|
|
73
|
+
] }, item == null ? void 0 : item.attrid);
|
|
54
74
|
};
|
|
55
|
-
const renderFileAttr = (item) => {
|
|
56
|
-
if (typeof (item == null ? void 0 : item.attrvalue) !== "string")
|
|
57
|
-
return;
|
|
75
|
+
const renderFileAttr = (item, span) => {
|
|
58
76
|
const attrvalues = JSON.parse((item == null ? void 0 : item.attrvalue) || "[]");
|
|
59
|
-
const
|
|
60
|
-
if (!useGrid) {
|
|
61
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Col, { span: labelSpan, style: { wordWrap: "break-word" }, children: [
|
|
62
|
-
item == null ? void 0 : item.attrname,
|
|
63
|
-
":",
|
|
64
|
-
renderItem
|
|
65
|
-
] }) }, item.attrid);
|
|
66
|
-
}
|
|
77
|
+
const valueNode = () => /* @__PURE__ */ jsxRuntime.jsx(antd.Space, { wrap: true, children: attrvalues.map((el, index) => /* @__PURE__ */ jsxRuntime.jsx("a", { onClick: () => window.open(el == null ? void 0 : el.FilePath), children: (el == null ? void 0 : el.FileName) || "-" }, index)) });
|
|
67
78
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
68
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
|
|
81
|
+
item == null ? void 0 : item.attrname,
|
|
82
|
+
":"
|
|
83
|
+
] }),
|
|
84
|
+
valueNode()
|
|
85
|
+
] }) }),
|
|
86
|
+
layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: valueNode() })
|
|
89
|
+
] })
|
|
90
|
+
] }, item == null ? void 0 : item.attrid);
|
|
71
91
|
};
|
|
72
|
-
const renderTextAttr = (item) => {
|
|
73
|
-
if (!useGrid) {
|
|
74
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Col, { span: labelSpan, style: { wordWrap: "break-word" }, children: [
|
|
75
|
-
item == null ? void 0 : item.attrname,
|
|
76
|
-
":",
|
|
77
|
-
(item == null ? void 0 : item.attrvalue) || "-"
|
|
78
|
-
] }) }, item.attrid);
|
|
79
|
-
}
|
|
92
|
+
const renderTextAttr = (item, span, beforeExtraValue) => {
|
|
80
93
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
81
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
|
|
96
|
+
item == null ? void 0 : item.attrname,
|
|
97
|
+
":"
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { wordWrap: "break-word" }, children: [
|
|
100
|
+
beforeExtraValue || "",
|
|
101
|
+
" ",
|
|
102
|
+
(item == null ? void 0 : item.attrvalue) || "-",
|
|
103
|
+
" "
|
|
104
|
+
] })
|
|
105
|
+
] }) }),
|
|
106
|
+
layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsxs(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: [
|
|
109
|
+
beforeExtraValue || "",
|
|
110
|
+
(item == null ? void 0 : item.attrvalue) || "-"
|
|
111
|
+
] })
|
|
112
|
+
] })
|
|
113
|
+
] }, item == null ? void 0 : item.attrid);
|
|
84
114
|
};
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
const renderTableDetail = ({
|
|
116
|
+
detailList = [],
|
|
117
|
+
attrList = [],
|
|
118
|
+
universalHeader = [],
|
|
119
|
+
operationColumn
|
|
120
|
+
}) => {
|
|
121
|
+
var _a;
|
|
122
|
+
let columns = [];
|
|
123
|
+
if (universalHeader == null ? void 0 : universalHeader.length) {
|
|
124
|
+
columns = universalHeader == null ? void 0 : universalHeader.map((item) => ({
|
|
125
|
+
title: item == null ? void 0 : item["header-name"],
|
|
126
|
+
dataIndex: item == null ? void 0 : item["header-attribute-id"],
|
|
127
|
+
key: item == null ? void 0 : item["header-attribute-id"],
|
|
128
|
+
width: item == null ? void 0 : item["header-width"]
|
|
129
|
+
}));
|
|
130
|
+
} else {
|
|
131
|
+
columns = (_a = attrList == null ? void 0 : attrList[0]) == null ? void 0 : _a.map((item) => {
|
|
132
|
+
var _a2;
|
|
133
|
+
return {
|
|
134
|
+
title: item == null ? void 0 : item.attrname,
|
|
135
|
+
dataIndex: item == null ? void 0 : item.attrid,
|
|
136
|
+
key: item == null ? void 0 : item.attrid,
|
|
137
|
+
width: ((_a2 = item == null ? void 0 : item.json) == null ? void 0 : _a2["input-width"]) || 200
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (operationColumn && (columns == null ? void 0 : columns.length)) {
|
|
142
|
+
columns.push(operationColumn);
|
|
143
|
+
}
|
|
144
|
+
let dataSource = detailList;
|
|
145
|
+
if (attrList == null ? void 0 : attrList.length) {
|
|
146
|
+
dataSource = attrList == null ? void 0 : attrList.map((v, i) => ({
|
|
147
|
+
jxqyglbh: i,
|
|
148
|
+
...handleDealAttrList(v)
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
+
antd.Table,
|
|
153
|
+
{
|
|
154
|
+
style: { width: "100%" },
|
|
155
|
+
columns,
|
|
156
|
+
scroll: { x: "max-content" },
|
|
157
|
+
size: "small",
|
|
158
|
+
rowKey: "jxqyglbh",
|
|
159
|
+
onRow: szxkFunc.handleSetTableRowColor,
|
|
160
|
+
dataSource,
|
|
161
|
+
pagination: false
|
|
162
|
+
}
|
|
163
|
+
) });
|
|
164
|
+
};
|
|
165
|
+
const handleDealAttrList = (attrList) => {
|
|
166
|
+
return attrList == null ? void 0 : attrList.reduce((pre, cur) => {
|
|
167
|
+
pre[cur == null ? void 0 : cur.attrid] = cur == null ? void 0 : cur.attrvalue;
|
|
168
|
+
return pre;
|
|
169
|
+
}, {});
|
|
170
|
+
};
|
|
171
|
+
const renderDetail = ahooks.useMemoizedFn(
|
|
172
|
+
({
|
|
173
|
+
attrList = [],
|
|
174
|
+
detailList = [],
|
|
175
|
+
span = 24,
|
|
176
|
+
type = "form",
|
|
177
|
+
universalHeader = [],
|
|
178
|
+
beforeExtraValue = "",
|
|
179
|
+
operationColumn
|
|
180
|
+
}) => {
|
|
181
|
+
if (type === "table") {
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: renderTableDetail({ detailList, attrList, universalHeader, operationColumn }) });
|
|
183
|
+
}
|
|
184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: [10, 8], children: attrList == null ? void 0 : attrList.map((item) => {
|
|
185
|
+
if ((item == null ? void 0 : item.attrtype) !== 0)
|
|
186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, {}, item == null ? void 0 : item.attrid);
|
|
187
|
+
const info = item.info_base64 === 1 ? method.getJson(method.base64ToString(item.info)) : method.getJson(item.info);
|
|
93
188
|
if ((info == null ? void 0 : info.input) === "image") {
|
|
94
|
-
|
|
95
|
-
} else if (["file", "audio", "video"].includes(info == null ? void 0 : info.input)) {
|
|
96
|
-
content = renderFileAttr(item);
|
|
97
|
-
} else {
|
|
98
|
-
content = renderTextAttr(item);
|
|
189
|
+
return renderImageAttr(item, span);
|
|
99
190
|
}
|
|
100
|
-
if ((
|
|
101
|
-
return
|
|
102
|
-
content,
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
-
"div",
|
|
105
|
-
{
|
|
106
|
-
style: {
|
|
107
|
-
marginLeft: "16px",
|
|
108
|
-
marginTop: "8px",
|
|
109
|
-
borderLeft: "2px dashed #e8e8e8",
|
|
110
|
-
paddingLeft: "16px"
|
|
111
|
-
},
|
|
112
|
-
children: renderAttrItems(item.children)
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
] }, item.attrid);
|
|
191
|
+
if (["file", "audio", "video"].includes(info == null ? void 0 : info.input)) {
|
|
192
|
+
return renderFileAttr(item, span);
|
|
116
193
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
194
|
+
if ((info == null ? void 0 : info.input) === "radio-card") {
|
|
195
|
+
return renderRadioCardAttr(item, span);
|
|
196
|
+
}
|
|
197
|
+
return renderTextAttr(item, span, beforeExtraValue);
|
|
198
|
+
}) });
|
|
199
|
+
}
|
|
200
|
+
);
|
|
122
201
|
return { renderDetail };
|
|
123
202
|
}
|
|
124
|
-
module.exports =
|
|
203
|
+
module.exports = useDetailRender;
|
package/lib/index.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
.custom-form-body {
|
|
3
|
-
width:
|
|
3
|
+
width: 1300;
|
|
4
4
|
}
|
|
5
5
|
.custom-form-body .custom-form-list {
|
|
6
6
|
position: relative;
|
|
@@ -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:
|
|
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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
position: sticky;
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
text-align: right;
|
|
92
|
+
right: 0;
|
|
93
|
+
top: 0;
|
|
94
|
+
bottom: 0;
|
|
69
95
|
}
|
package/lib/mock/index.js
CHANGED
|
@@ -4,45 +4,110 @@ const baseAttrList = [];
|
|
|
4
4
|
const attrList = [
|
|
5
5
|
{
|
|
6
6
|
xh: 1,
|
|
7
|
-
asid: "
|
|
7
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
8
8
|
astype: 0,
|
|
9
|
-
tname: "
|
|
10
|
-
attrid: "
|
|
11
|
-
attrname: "
|
|
9
|
+
tname: "tsyy_table2",
|
|
10
|
+
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
11
|
+
attrname: "Dates",
|
|
12
12
|
attrtype: 0,
|
|
13
|
-
info: '{"input":"
|
|
13
|
+
info: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
14
14
|
info_base64: 0,
|
|
15
|
-
createtime: "2026-02-11 15:
|
|
15
|
+
createtime: "2026-02-11 15:12:26",
|
|
16
16
|
attrvalue: "",
|
|
17
17
|
serialnum: 1,
|
|
18
18
|
children: [],
|
|
19
19
|
json: {
|
|
20
|
-
input: "
|
|
20
|
+
input: "multiple-date-picker",
|
|
21
|
+
"range-picker-save": "single",
|
|
21
22
|
dataType: "string",
|
|
22
|
-
length:
|
|
23
|
-
"input-width":
|
|
24
|
-
|
|
23
|
+
length: 1e3,
|
|
24
|
+
"input-width": 240,
|
|
25
|
+
must: true
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
xh: 2,
|
|
29
|
-
asid: "
|
|
30
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
30
31
|
astype: 0,
|
|
31
|
-
tname: "
|
|
32
|
-
attrid: "
|
|
33
|
-
attrname: "
|
|
32
|
+
tname: "tsyy_table2",
|
|
33
|
+
attrid: "38A7DADC6D64492D83DA607EC121A02D",
|
|
34
|
+
attrname: "How Many Times",
|
|
34
35
|
attrtype: 0,
|
|
35
|
-
info: '{"input":"text","dataType":"string","length":
|
|
36
|
+
info: '{"input":"text","dataType":"string","length":10,"input-width":140,"must":true}',
|
|
36
37
|
info_base64: 0,
|
|
37
|
-
createtime: "2026-02-11 15:
|
|
38
|
+
createtime: "2026-02-11 15:12:26",
|
|
39
|
+
attrvalue: "",
|
|
40
|
+
serialnum: 2,
|
|
41
|
+
children: [],
|
|
42
|
+
json: {
|
|
43
|
+
input: "text",
|
|
44
|
+
dataType: "string",
|
|
45
|
+
length: 10,
|
|
46
|
+
"input-width": 140,
|
|
47
|
+
must: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
xh: 3,
|
|
52
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
53
|
+
astype: 0,
|
|
54
|
+
tname: "tsyy_table2",
|
|
55
|
+
attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
|
|
56
|
+
attrname: "Feeding Time",
|
|
57
|
+
attrtype: 0,
|
|
58
|
+
info: '{"input":"second-picker","dataType":"string","length":200,"input-width":240}',
|
|
59
|
+
info_base64: 0,
|
|
60
|
+
createtime: "2026-02-11 15:12:26",
|
|
38
61
|
attrvalue: "",
|
|
39
62
|
serialnum: 3,
|
|
40
63
|
children: [],
|
|
64
|
+
json: {
|
|
65
|
+
input: "second-picker",
|
|
66
|
+
dataType: "string",
|
|
67
|
+
length: 200,
|
|
68
|
+
"input-width": 240
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
xh: 4,
|
|
73
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
74
|
+
astype: 0,
|
|
75
|
+
tname: "tsyy_table2",
|
|
76
|
+
attrid: "665F59E637664037939512C9877EAD75",
|
|
77
|
+
attrname: "Meds Info",
|
|
78
|
+
attrtype: 0,
|
|
79
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":240}',
|
|
80
|
+
info_base64: 0,
|
|
81
|
+
createtime: "2026-02-11 15:12:26",
|
|
82
|
+
attrvalue: "",
|
|
83
|
+
serialnum: 4,
|
|
84
|
+
children: [],
|
|
85
|
+
json: {
|
|
86
|
+
input: "text",
|
|
87
|
+
dataType: "string",
|
|
88
|
+
length: 500,
|
|
89
|
+
"input-width": 240
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
xh: 5,
|
|
94
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
95
|
+
astype: 0,
|
|
96
|
+
tname: "tsyy_table2",
|
|
97
|
+
attrid: "290CF33D2AAD45399987987FAB80900B",
|
|
98
|
+
attrname: "Feeding Instruction",
|
|
99
|
+
attrtype: 0,
|
|
100
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":340}',
|
|
101
|
+
info_base64: 0,
|
|
102
|
+
createtime: "2026-02-11 15:12:26",
|
|
103
|
+
attrvalue: "",
|
|
104
|
+
serialnum: 5,
|
|
105
|
+
children: [],
|
|
41
106
|
json: {
|
|
42
107
|
input: "text",
|
|
43
108
|
dataType: "string",
|
|
44
|
-
length:
|
|
45
|
-
"input-width":
|
|
109
|
+
length: 500,
|
|
110
|
+
"input-width": 340
|
|
46
111
|
}
|
|
47
112
|
}
|
|
48
113
|
];
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 宠物详情渲染 Hook
|
|
3
|
-
* @param attrList 属性列表数据
|
|
4
|
-
* @param config 配置信息(用于文件预览地址)
|
|
5
|
-
* @returns 渲染函数
|
|
6
|
-
*/
|
|
7
|
-
interface IAttrSetDetailRendererProps {
|
|
8
|
-
labelSpan?: number;
|
|
9
|
-
valueSpan?: number;
|
|
10
|
-
imgWidth?: number;
|
|
11
|
-
imgHeight?: number;
|
|
12
|
-
layoutType?: 'row' | 'flex';
|
|
13
|
-
}
|
|
14
|
-
export default function useAttrSetDetailRenderer({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
|
|
15
|
-
renderDetail: ({ attrList, detailList, span, type, universalHeader, beforeExtraValue, operationColumn, }: {
|
|
16
|
-
attrList?: any[] | undefined;
|
|
17
|
-
detailList?: any[] | undefined;
|
|
18
|
-
span?: number | undefined;
|
|
19
|
-
type?: "form" | "table" | undefined;
|
|
20
|
-
universalHeader?: any[] | undefined;
|
|
21
|
-
beforeExtraValue?: string | undefined;
|
|
22
|
-
operationColumn?: any;
|
|
23
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
};
|
|
25
|
-
export {};
|