szld-libs 0.2.95 → 0.2.97

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.
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const antd = require("antd");
4
+ const react = require("react");
5
+ const ahooks = require("ahooks");
6
+ const szxkFunc = require("../utils/szxkFunc");
7
+ function useAttrSetDetailRenderer({
8
+ labelSpan = 3,
9
+ valueSpan = 9,
10
+ imgWidth = 93,
11
+ imgHeight = 93,
12
+ layoutType = "row"
13
+ }) {
14
+ const { message } = antd.App.useApp();
15
+ const renderRadioCardAttr = (item, span) => {
16
+ try {
17
+ const attrvalue = JSON.parse((item == null ? void 0 : item.attrvalue) || "{}") || "";
18
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
19
+ layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
20
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
21
+ item == null ? void 0 : item.attrname,
22
+ ":"
23
+ ] }),
24
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { wordWrap: "break-word" }, children: attrvalue == null ? void 0 : attrvalue.typename })
25
+ ] }) }),
26
+ layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
27
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
28
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: item == null ? void 0 : item.attrvalue })
29
+ ] })
30
+ ] }, item == null ? void 0 : item.attrid);
31
+ } catch (error) {
32
+ message.error("房型数据格式错误,转json失败");
33
+ return null;
34
+ }
35
+ };
36
+ const renderImageAttr = (item, span) => {
37
+ if (typeof (item == null ? void 0 : item.attrvalue) !== "string")
38
+ return;
39
+ const attrvalues = JSON.parse((item == null ? void 0 : item.attrvalue) || "[]");
40
+ const valueNode = () => /* @__PURE__ */ jsxRuntime.jsx(antd.Space, { wrap: true, children: attrvalues.map((el, index) => /* @__PURE__ */ jsxRuntime.jsx(
41
+ "div",
42
+ {
43
+ style: {
44
+ border: "1px solid rgba(0, 0, 0, 0.15)",
45
+ borderRadius: 4
46
+ },
47
+ children: /* @__PURE__ */ jsxRuntime.jsx(
48
+ antd.Image,
49
+ {
50
+ style: { objectFit: "cover", padding: 5 },
51
+ width: imgWidth,
52
+ height: imgHeight,
53
+ src: el == null ? void 0 : el.FilePath,
54
+ alt: (item == null ? void 0 : item.attrname) || "-"
55
+ }
56
+ )
57
+ },
58
+ index
59
+ )) });
60
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
61
+ layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
62
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
63
+ item == null ? void 0 : item.attrname,
64
+ ":"
65
+ ] }),
66
+ valueNode()
67
+ ] }) }),
68
+ layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
69
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
70
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: valueNode() })
71
+ ] })
72
+ ] }, item == null ? void 0 : item.attrid);
73
+ };
74
+ const renderFileAttr = (item, span) => {
75
+ const attrvalues = JSON.parse((item == null ? void 0 : item.attrvalue) || "[]");
76
+ 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)) });
77
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
78
+ layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
79
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
80
+ item == null ? void 0 : item.attrname,
81
+ ":"
82
+ ] }),
83
+ valueNode()
84
+ ] }) }),
85
+ layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
86
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
87
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: valueNode() })
88
+ ] })
89
+ ] }, item == null ? void 0 : item.attrid);
90
+ };
91
+ const renderTextAttr = (item, span, beforeExtraValue) => {
92
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
93
+ layoutType === "flex" && /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { children: [
94
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flexShrink: 0 }, children: [
95
+ item == null ? void 0 : item.attrname,
96
+ ":"
97
+ ] }),
98
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { wordWrap: "break-word" }, children: [
99
+ beforeExtraValue || "",
100
+ " ",
101
+ (item == null ? void 0 : item.attrvalue) || "-",
102
+ " "
103
+ ] })
104
+ ] }) }),
105
+ layoutType === "row" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
106
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: labelSpan, children: item == null ? void 0 : item.attrname }),
107
+ /* @__PURE__ */ jsxRuntime.jsxs(antd.Col, { span: valueSpan, style: { wordWrap: "break-word" }, children: [
108
+ beforeExtraValue || "",
109
+ (item == null ? void 0 : item.attrvalue) || "-"
110
+ ] })
111
+ ] })
112
+ ] }, item == null ? void 0 : item.attrid);
113
+ };
114
+ const renderTableDetail = ({
115
+ attrList = [],
116
+ servicesUniversalHeader = [],
117
+ operationColumn
118
+ }) => {
119
+ const columns = servicesUniversalHeader == null ? void 0 : servicesUniversalHeader.map((item) => ({
120
+ title: item == null ? void 0 : item["header-name"],
121
+ dataIndex: item == null ? void 0 : item["header-attribute-id"],
122
+ key: item == null ? void 0 : item["header-attribute-id"],
123
+ width: item == null ? void 0 : item["header-width"]
124
+ }));
125
+ if (operationColumn) {
126
+ columns.push(operationColumn);
127
+ }
128
+ const dataSource = attrList == null ? void 0 : attrList.map((v, i) => ({
129
+ key: i,
130
+ ...handleDealAttrList(v)
131
+ }));
132
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
133
+ antd.Table,
134
+ {
135
+ style: { width: "100%" },
136
+ columns,
137
+ scroll: { x: "max-content" },
138
+ size: "small",
139
+ rowKey: "key",
140
+ onRow: szxkFunc.handleSetTableRowColor,
141
+ dataSource,
142
+ pagination: false
143
+ }
144
+ ) });
145
+ };
146
+ const handleDealAttrList = (attrList) => {
147
+ return attrList == null ? void 0 : attrList.reduce((pre, cur) => {
148
+ pre[cur == null ? void 0 : cur.attrid] = cur == null ? void 0 : cur.attrvalue;
149
+ return pre;
150
+ }, {});
151
+ };
152
+ const renderDetail = ahooks.useMemoizedFn(
153
+ ({
154
+ attrList = [],
155
+ span = 24,
156
+ type = "form",
157
+ servicesUniversalHeader = [],
158
+ beforeExtraValue = "",
159
+ operationColumn
160
+ }) => {
161
+ if (!(attrList == null ? void 0 : attrList.length))
162
+ return null;
163
+ if (type === "table") {
164
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: renderTableDetail({ attrList, servicesUniversalHeader, operationColumn }) });
165
+ }
166
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: [10, 8], children: attrList == null ? void 0 : attrList.map((item) => {
167
+ if ((item == null ? void 0 : item.attrtype) !== 0)
168
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, {}, item == null ? void 0 : item.attrid);
169
+ const info = (item == null ? void 0 : item.json) || (item == null ? void 0 : item.info) && JSON.parse(item.info);
170
+ if ((info == null ? void 0 : info.input) === "image") {
171
+ return renderImageAttr(item, span);
172
+ }
173
+ if (["file", "audio", "video"].includes(info == null ? void 0 : info.input)) {
174
+ return renderFileAttr(item, span);
175
+ }
176
+ if ((info == null ? void 0 : info.input) === "radio-card") {
177
+ return renderRadioCardAttr(item, span);
178
+ }
179
+ return renderTextAttr(item, span, beforeExtraValue);
180
+ }) });
181
+ }
182
+ );
183
+ return { renderDetail };
184
+ }
185
+ module.exports = useAttrSetDetailRenderer;
package/lib/index.js CHANGED
@@ -4,188 +4,16 @@ const react = require("react");
4
4
  const ReactDOM = require("react-dom/client");
5
5
  const reactRouterDom = require("react-router-dom");
6
6
  const antd = require("antd");
7
- const useConfig = require("./hooks/useConfig");
8
7
  const main = require("./main");
9
- let key = "U2FsdGVkX1/dG1NSXNR9hnp3Ech/v6Gh8CDDJxgBm1EPFQel12ySIf84ARXCPwTae7TzwgPvjOyE3S5rAEzl/wAZmId6pbezpFeFcJqxdmIl3FeluYHFxJzQHDETTvrr3G/REvv00kHptOVwg6ecjPH6yk7PNit0sWTBLorROxLxMD8lVDmOA66p7Zp4QnYzqScYJGFbutmfHYXfBRBe1Q2UKummJ798svNY5SIwEwl4spzgyWmhARtuyq4zhysFrj/xODuNDjtwitA6XfX566WcZkj3F+2P+mkYzDYOhXXaomnlybjrZ2hEHfcczQhUfJd89O8PNIuEWo24wjYRgMdKlw5CWSeocFCqV7ZJ/CV/7vNRcaO4awKlFNobLikkwDznxpcX+4UEej+ED+pgfmPQLsKedcfEscStkSAZXaD5pBRTiFU9xGLfDt6seUrEnMBeXkpMIY9j1SZDDK18/G7lSHjDQMZYZP6sfLdBdwY=";
10
8
  const Demo = () => {
11
- useConfig(key);
12
- const [form] = antd.Form.useForm();
9
+ antd.Form.useForm();
13
10
  react.useEffect(() => {
14
11
  }, []);
15
- const columns = [
16
- {
17
- dataIndex: ["a", 2],
18
- title: "a"
19
- },
20
- antd.Table.EXPAND_COLUMN,
21
- {
22
- dataIndex: "b",
23
- title: "b",
24
- width: 400
25
- },
26
- antd.Table.SELECTION_COLUMN,
27
- {
28
- dataIndex: "c",
29
- title: "c"
30
- }
31
- ];
32
- const [list, setList] = react.useState(
33
- Array(10).fill(0).map((v, i) => ({ id: i }))
34
- );
35
- const [current, setCurrent] = react.useState(1);
36
- const data = [{ id: 1 }, { id: 12 }, { id: 21 }];
37
- const { selectedKeys, selectedRows, setSelectedKeys } = main.useRowSelection({
38
- dataSource: list,
39
- rowKey: "id",
40
- defaultRows: data
41
- });
42
- react.useEffect(() => {
43
- setSelectedKeys([1, 12, 21]);
44
- }, []);
45
- const { handleChangePwd } = main.useChangePwd();
46
- const typeList = [
47
- {
48
- flinfo: "数据",
49
- children: [
50
- {
51
- flinfo: "数据1"
52
- },
53
- {
54
- flinfo: "数据2"
55
- }
56
- ]
57
- },
58
- {
59
- flinfo: "表",
60
- children: [
61
- {
62
- flinfo: "表1"
63
- },
64
- {
65
- flinfo: "表2"
66
- }
67
- ]
68
- }
69
- ];
70
- const imgAccept = ".jpg,.png,.jpeg";
71
- const imgUploadProps = {
72
- maxCount: 1,
73
- action: "uploadAction",
74
- accept: imgAccept,
75
- showUploadList: false,
76
- beforeUpload(file) {
77
- var _a;
78
- const accepts = imgAccept.split(",");
79
- const fileType = (_a = file.name.split(".").pop()) == null ? void 0 : _a.toLocaleLowerCase();
80
- if (!accepts.includes(`.${fileType}`)) {
81
- antd.message.error(`只允许上传${accepts.join("、")}文件`);
82
- return antd.Upload.LIST_IGNORE;
83
- }
84
- return file;
85
- }
86
- };
87
- const normFile = (e) => {
88
- if (Array.isArray(e)) {
89
- return e;
90
- }
91
- return e && e.fileList;
92
- };
93
- const formItems = [
94
- {
95
- dataIndex: "asctypeid",
96
- title: "编号",
97
- valueType: "inputNumber",
98
- valueProps: {
99
- placeholder: "请输入编号",
100
- controls: false,
101
- min: 0
102
- },
103
- formItemProps: {
104
- rules: [
105
- {
106
- required: true,
107
- message: "请输入编号"
108
- }
109
- ]
110
- },
111
- colProps: { span: 11 }
112
- },
113
- {
114
- dataIndex: "asctype",
115
- title: "归类名",
116
- valueProps: {
117
- placeholder: "请输入归类名",
118
- maxLength: 100,
119
- allowClear: true
120
- },
121
- colProps: { span: 11, offset: 2 },
122
- formItemProps: {
123
- rules: [
124
- {
125
- required: true,
126
- message: "请输入归类名"
127
- },
128
- { whitespace: true, message: "输入内容不能只有空格" }
129
- ]
130
- }
131
- },
132
- {
133
- dataIndex: "tabsortList",
134
- title: "分类",
135
- valueType: "cascader",
136
- valueProps: {
137
- placeholder: "请选择分类",
138
- options: typeList,
139
- changeOnSelect: true,
140
- fieldNames: {
141
- label: "flinfo",
142
- value: "flinfo",
143
- children: "children"
144
- }
145
- },
146
- colProps: {
147
- span: 11
148
- }
149
- },
150
- {
151
- dataIndex: "fileList",
152
- title: "营业执照",
153
- valueType: "custom",
154
- valueProps: {
155
- children: /* @__PURE__ */ jsxRuntime.jsx(antd.Upload, { ...imgUploadProps, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { children: "上传营业执照" }) }),
156
- fileList: form.getFieldValue("fileList")
157
- },
158
- colProps: {
159
- md: 24,
160
- xl: 10
161
- },
162
- formItemProps: {
163
- valuePropName: "fileList",
164
- getValueFromEvent: normFile,
165
- rules: [{ required: true, message: "请上传营业执照" }]
166
- }
167
- }
168
- ];
169
- const totalText = "共@";
170
- const unitText = "条@";
171
- const jumpText = "跳至@";
172
- const pageText = "页@";
173
12
  const sm3key = "Aa123456#";
174
13
  const msg = "username=admin&timestamp=1758782465&modelid=19955BC7B61A43B3A982F0B2053ABC34";
175
14
  main.HmacSM3.hmac(sm3key, msg);
176
15
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
177
16
  /* @__PURE__ */ jsxRuntime.jsx(main.BackHeader, { title: "页头组件", isBack: true }),
178
- /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 20, align: "center", children: [
179
- "1. 测试修改密码hooks",
180
- /* @__PURE__ */ jsxRuntime.jsx(
181
- antd.Button,
182
- {
183
- onClick: () => handleChangePwd((params) => {
184
- }),
185
- children: "修改密码"
186
- }
187
- )
188
- ] }),
189
17
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
190
18
  "2. 测试循环滚动组件",
191
19
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -198,92 +26,6 @@ const Demo = () => {
198
26
  }
199
27
  }
200
28
  )
201
- ] }),
202
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
203
- /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 20, align: "center", style: { marginBottom: 10 }, children: [
204
- "3. 测试表格组件",
205
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: () => setList(columns), children: "test" })
206
- ] }),
207
- /* @__PURE__ */ jsxRuntime.jsx(
208
- main.SearchTable,
209
- {
210
- tableProps: {
211
- columns: [
212
- {
213
- dataIndex: "id",
214
- title: "ID"
215
- },
216
- {
217
- dataIndex: "a",
218
- title: "a",
219
- width: 200
220
- },
221
- {
222
- dataIndex: "a2",
223
- title: "a",
224
- width: 200
225
- },
226
- {
227
- dataIndex: "a3",
228
- title: "a",
229
- width: 200
230
- },
231
- {
232
- dataIndex: "a4",
233
- title: "a",
234
- width: 400
235
- }
236
- ],
237
- dataSource: list,
238
- resizeable: true,
239
- rowKey: "id",
240
- pagination: {
241
- total: 25,
242
- current,
243
- pageSize: 10,
244
- onChange(page, pageSize) {
245
- const index = (page - 1) * 10;
246
- const arr = Array(10).fill(0).map((v, i) => ({ id: i + index }));
247
- setList(arr);
248
- setCurrent(page);
249
- }
250
- }
251
- }
252
- }
253
- )
254
- ] }),
255
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
256
- "4. 测试创建表单组件",
257
- /* @__PURE__ */ jsxRuntime.jsx(
258
- main.CreateForm,
259
- {
260
- items: formItems,
261
- formProps: { form, wrapperCol: { span: 24 }, style: { width: "60%", marginTop: 10 } }
262
- }
263
- )
264
- ] }),
265
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
266
- "5. 测试自定义分页组件",
267
- /* @__PURE__ */ jsxRuntime.jsx(
268
- main.CustomPagination,
269
- {
270
- paginationProps: {
271
- total: 25,
272
- current,
273
- pageSize: 10,
274
- onChange(page, pageSize) {
275
- const index = (page - 1) * 10;
276
- const arr = Array(10).fill(0).map((v, i) => ({ id: i + index }));
277
- setList(arr);
278
- setCurrent(page);
279
- }
280
- },
281
- totalText,
282
- unitText,
283
- jumpText,
284
- pageText
285
- }
286
- )
287
29
  ] })
288
30
  ] });
289
31
  };
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -315,6 +315,7 @@ const handleAttrListToObj = (attrList) => {
315
315
  const { attrvalue = [], children = [] } = item || {};
316
316
  if (Array.isArray(attrvalue) && (attrvalue == null ? void 0 : attrvalue.length)) {
317
317
  item.children = attrvalue.map((v) => {
318
+ return handleObjDetailToSignleAttrList((children == null ? void 0 : children[0]) || [], v);
318
319
  });
319
320
  result[key] = {
320
321
  asid: ((_e = (_d = (_c = item.children) == null ? void 0 : _c[0]) == null ? void 0 : _d[0]) == null ? void 0 : _e.asid) || "",
@@ -468,6 +469,12 @@ const handleSelectOptions = async ({
468
469
  }
469
470
  return options;
470
471
  };
472
+ const handleObjDetailToSignleAttrList = (attrList, detail) => {
473
+ return attrList.map((item) => ({
474
+ ...item,
475
+ attrvalue: detail[item.attrid] || ""
476
+ }));
477
+ };
471
478
  exports.base64ToString = base64ToString;
472
479
  exports.getJson = getJson;
473
480
  exports.handleAttrList = handleAttrList;
@@ -28,3 +28,11 @@ export declare const handleGetAttrDetail: (params: {
28
28
  * @returns 处理后的属性集列表,每个属性项包含attrvalue
29
29
  */
30
30
  export declare const handleObjDetailToSignleAttrList: (attrList: any[], detail: any) => any[];
31
+ /**
32
+ * 设置表格行的颜色
33
+ */
34
+ export declare const handleSetTableRowColor: (record: any, index: number | undefined) => {
35
+ style: {
36
+ backgroundColor: string;
37
+ };
38
+ };
@@ -28,6 +28,12 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
28
28
  attrvalue: detail[item.attrid] || ""
29
29
  }));
30
30
  };
31
+ const handleSetTableRowColor = (record, index) => ({
32
+ style: {
33
+ backgroundColor: index !== void 0 && index % 2 === 1 ? "var(--bg-color-2)" : "var(--bg-color-3)"
34
+ }
35
+ });
31
36
  exports.handleGetAttrDetail = handleGetAttrDetail;
32
37
  exports.handleGetAttrList = handleGetAttrList;
33
38
  exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
39
+ exports.handleSetTableRowColor = handleSetTableRowColor;
package/lib/vite-env.d.ts CHANGED
@@ -12,3 +12,9 @@ interface ICustomModal {
12
12
  footer?: React.ReactNode;
13
13
  modalStyle?: React.CSSProperties;
14
14
  }
15
+ interface IFileRes {
16
+ FileId: string;
17
+ FileName: string;
18
+ FileExt: string;
19
+ FilePath: string;
20
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.95",
4
+ "version": "0.2.97",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",