szld-libs 0.4.63 → 0.4.64
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 +1852 -1838
- package/dist/szld-components.umd.js +35 -35
- package/es/hooks/useUniversalTable.d.ts +1 -1
- package/es/hooks/useUniversalTable.js +98 -73
- package/lib/hooks/useUniversalTable.d.ts +1 -1
- package/lib/hooks/useUniversalTable.js +98 -73
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ declare function useUniversalTable(): {
|
|
|
12
12
|
downloadText?: string | undefined;
|
|
13
13
|
otherLangPageId?: string | undefined;
|
|
14
14
|
objDefaultLangPageId?: string | undefined;
|
|
15
|
-
}) => any[] | import("antd/es/message/interface").MessageType;
|
|
15
|
+
}) => any[] | import("antd/es/message/interface").MessageType | undefined;
|
|
16
16
|
handleSelListToFormItems: ({ selListData, handleSearch, handleReset, detail, styles, attributeSetId, commonRequest, commonRequestWidthParams, getTitle, searchText, resetText, langConfig, }: {
|
|
17
17
|
selListData: any[];
|
|
18
18
|
handleSearch: (values: any, selListData: any[]) => void;
|
|
@@ -223,91 +223,116 @@ function useUniversalTable() {
|
|
|
223
223
|
objDefaultLangPageId = "5000000"
|
|
224
224
|
// 处理这种数据时 如果没有拼接页面编号则使用默认编号{"list":["021"],"delimiter":""}
|
|
225
225
|
}) => {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
226
|
+
try {
|
|
227
|
+
if (!(universalHeader == null ? void 0 : universalHeader.length))
|
|
228
|
+
return message.error("请配置 universalHeader表头数据");
|
|
229
|
+
const sortedHeader = handleSortByHeaderNumber(universalHeader);
|
|
230
|
+
const list = sortedHeader == null ? void 0 : sortedHeader.map((item) => {
|
|
231
|
+
const column = {
|
|
232
|
+
title: attributeSetId ? (getTitle == null ? void 0 : getTitle(attributeSetId, item == null ? void 0 : item["header-attribute-id"])) || "" : (item == null ? void 0 : item["header-name"]) || "",
|
|
233
|
+
dataIndex: (item == null ? void 0 : item["header-attribute-id"]) || "",
|
|
234
|
+
width: (item == null ? void 0 : item["header-width"]) || void 0,
|
|
235
|
+
render: (text, record) => {
|
|
236
|
+
var _a, _b, _c, _d;
|
|
237
|
+
if (text && text && typeof text === "string" && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
|
|
238
|
+
try {
|
|
239
|
+
const items = JSON.parse(text);
|
|
240
|
+
if (items == null ? void 0 : items.length) {
|
|
241
|
+
return /* @__PURE__ */ jsx(Flex, { vertical: true, children: items == null ? void 0 : items.map((item2) => {
|
|
242
|
+
const { FileName, FilePath } = item2 || {};
|
|
243
|
+
return /* @__PURE__ */ jsxs(Space, { children: [
|
|
244
|
+
/* @__PURE__ */ jsx("span", { children: FileName }),
|
|
245
|
+
/* @__PURE__ */ jsx(Button, { type: "link", size: "small", onClick: () => downloadUrl(FilePath), children: downloadText })
|
|
246
|
+
] });
|
|
247
|
+
}) });
|
|
248
|
+
}
|
|
249
|
+
return "-";
|
|
250
|
+
} catch (error) {
|
|
247
251
|
}
|
|
248
|
-
return
|
|
249
|
-
} catch (error) {
|
|
252
|
+
return /* @__PURE__ */ jsx(Space, {});
|
|
250
253
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
if ((item == null ? void 0 : item["show-lang-data-id"]) && otherLangPageId) {
|
|
255
|
+
if (text && text && typeof text === "object" && ((_a = Object.keys(text)) == null ? void 0 : _a.includes("delimiter"))) {
|
|
256
|
+
const { list: list2, delimiter = "," } = text || {};
|
|
257
|
+
const newList = list2 == null ? void 0 : list2.map((item2) => {
|
|
258
|
+
const arr = (item2 == null ? void 0 : item2.split("|")) || [];
|
|
259
|
+
const pageId = (arr == null ? void 0 : arr.length) > 1 ? arr[0] : objDefaultLangPageId;
|
|
260
|
+
const str = (arr == null ? void 0 : arr.length) > 1 ? arr[1] : arr[0];
|
|
261
|
+
return getTitle == null ? void 0 : getTitle(pageId, str);
|
|
262
|
+
});
|
|
263
|
+
return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: ((_b = newList == null ? void 0 : newList.join(delimiter)) == null ? void 0 : _b.replace(/br/g, "<br>")) || "-" } });
|
|
264
|
+
}
|
|
265
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsx("span", { style: { cursor: "pointer" }, children: getTitle == null ? void 0 : getTitle(otherLangPageId, text ?? "-") }) });
|
|
266
|
+
}
|
|
267
|
+
if (text && text && typeof text === "object" && ((_c = Object.keys(text)) == null ? void 0 : _c.includes("delimiter"))) {
|
|
255
268
|
const { list: list2, delimiter = "," } = text || {};
|
|
256
|
-
|
|
257
|
-
const arr = (item2 == null ? void 0 : item2.split("|")) || [];
|
|
258
|
-
const pageId = (arr == null ? void 0 : arr.length) > 1 ? arr[0] : objDefaultLangPageId;
|
|
259
|
-
const str = (arr == null ? void 0 : arr.length) > 1 ? arr[1] : arr[0];
|
|
260
|
-
return getTitle == null ? void 0 : getTitle(pageId, str);
|
|
261
|
-
});
|
|
262
|
-
return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: ((_b = newList == null ? void 0 : newList.join(delimiter)) == null ? void 0 : _b.replace(/br/g, "<br>")) || "-" } });
|
|
269
|
+
return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: ((_d = list2 == null ? void 0 : list2.join(delimiter)) == null ? void 0 : _d.replace(/br/g, "<br>")) || "-" } });
|
|
263
270
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
271
|
+
const mulAttrStyle = item == null ? void 0 : item["header-mul-attribute-st@yle"];
|
|
272
|
+
if (mulAttrStyle) {
|
|
273
|
+
const { style } = mulAttrStyle;
|
|
274
|
+
const matchKey = (mulAttrStyle == null ? void 0 : mulAttrStyle["match-key"]) || [];
|
|
275
|
+
const matchValue = (mulAttrStyle == null ? void 0 : mulAttrStyle["match-value"]) || [];
|
|
276
|
+
if (matchKey && matchValue && style && Array.isArray(matchKey) && Array.isArray(matchValue)) {
|
|
277
|
+
const isMatch = matchValue.some((valueGroup) => {
|
|
278
|
+
return matchKey.every((key, index) => {
|
|
279
|
+
const recordValue = record[key];
|
|
280
|
+
return valueGroup.includes(recordValue);
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
if (isMatch) {
|
|
284
|
+
return /* @__PURE__ */ jsx("span", { style, children: text ?? "-" });
|
|
285
|
+
}
|
|
286
|
+
return text ?? "-";
|
|
287
|
+
}
|
|
288
|
+
if (style) {
|
|
289
|
+
return /* @__PURE__ */ jsx("span", { style, children: text ?? "-" });
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return text ?? "-";
|
|
269
293
|
}
|
|
270
|
-
|
|
294
|
+
};
|
|
295
|
+
const mulAttrConfig = item == null ? void 0 : item["header-mul-attribute-id"];
|
|
296
|
+
const showBtn = item == null ? void 0 : item["show-btn"];
|
|
297
|
+
if (mulAttrConfig && mulAttrConfig.list && Array.isArray(mulAttrConfig.list)) {
|
|
298
|
+
column.render = (_, record) => {
|
|
299
|
+
var _a;
|
|
300
|
+
const { list: list2, delimiter = "," } = mulAttrConfig;
|
|
301
|
+
const values = list2.map((attrId) => {
|
|
302
|
+
if (!attrId)
|
|
303
|
+
return "";
|
|
304
|
+
return record[attrId] ?? "";
|
|
305
|
+
}).filter((val) => val !== "");
|
|
306
|
+
const content = (values == null ? void 0 : values.join(delimiter)) ?? "-";
|
|
307
|
+
if (showBtn && extraBtn) {
|
|
308
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
309
|
+
content ?? "-",
|
|
310
|
+
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
311
|
+
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
312
|
+
] });
|
|
313
|
+
}
|
|
314
|
+
return content || "-";
|
|
315
|
+
};
|
|
271
316
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
column.render = (_, record) => {
|
|
277
|
-
var _a;
|
|
278
|
-
const { list: list2, delimiter = "," } = mulAttrConfig;
|
|
279
|
-
const values = list2.map((attrId) => {
|
|
280
|
-
if (!attrId)
|
|
281
|
-
return "";
|
|
282
|
-
return record[attrId] ?? "";
|
|
283
|
-
}).filter((val) => val !== "");
|
|
284
|
-
const content = (values == null ? void 0 : values.join(delimiter)) ?? "-";
|
|
285
|
-
if (showBtn && extraBtn) {
|
|
317
|
+
if (showBtn && extraBtn) {
|
|
318
|
+
column.render = (_, record) => {
|
|
319
|
+
var _a;
|
|
320
|
+
const content = record[column.dataIndex] || "";
|
|
286
321
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
287
|
-
content
|
|
322
|
+
content || "-",
|
|
288
323
|
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
289
324
|
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
290
325
|
] });
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const content = record[column.dataIndex] || "";
|
|
298
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
299
|
-
content || "-",
|
|
300
|
-
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
301
|
-
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
302
|
-
] });
|
|
303
|
-
};
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
return column;
|
|
329
|
+
});
|
|
330
|
+
if (operationColumnConfig && (list == null ? void 0 : list.length)) {
|
|
331
|
+
list.push(operationColumnConfig);
|
|
304
332
|
}
|
|
305
|
-
return
|
|
306
|
-
})
|
|
307
|
-
if (operationColumnConfig && (list == null ? void 0 : list.length)) {
|
|
308
|
-
list.push(operationColumnConfig);
|
|
333
|
+
return list;
|
|
334
|
+
} catch (error) {
|
|
309
335
|
}
|
|
310
|
-
return list;
|
|
311
336
|
};
|
|
312
337
|
const handleSortByHeaderNumber = (arr) => {
|
|
313
338
|
return arr.slice().sort((a, b) => {
|
|
@@ -12,7 +12,7 @@ declare function useUniversalTable(): {
|
|
|
12
12
|
downloadText?: string | undefined;
|
|
13
13
|
otherLangPageId?: string | undefined;
|
|
14
14
|
objDefaultLangPageId?: string | undefined;
|
|
15
|
-
}) => any[] | import("antd/es/message/interface").MessageType;
|
|
15
|
+
}) => any[] | import("antd/es/message/interface").MessageType | undefined;
|
|
16
16
|
handleSelListToFormItems: ({ selListData, handleSearch, handleReset, detail, styles, attributeSetId, commonRequest, commonRequestWidthParams, getTitle, searchText, resetText, langConfig, }: {
|
|
17
17
|
selListData: any[];
|
|
18
18
|
handleSearch: (values: any, selListData: any[]) => void;
|
|
@@ -224,91 +224,116 @@ function useUniversalTable() {
|
|
|
224
224
|
objDefaultLangPageId = "5000000"
|
|
225
225
|
// 处理这种数据时 如果没有拼接页面编号则使用默认编号{"list":["021"],"delimiter":""}
|
|
226
226
|
}) => {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
/* @__PURE__ */ jsxRuntime.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
227
|
+
try {
|
|
228
|
+
if (!(universalHeader == null ? void 0 : universalHeader.length))
|
|
229
|
+
return message.error("请配置 universalHeader表头数据");
|
|
230
|
+
const sortedHeader = handleSortByHeaderNumber(universalHeader);
|
|
231
|
+
const list = sortedHeader == null ? void 0 : sortedHeader.map((item) => {
|
|
232
|
+
const column = {
|
|
233
|
+
title: attributeSetId ? (getTitle == null ? void 0 : getTitle(attributeSetId, item == null ? void 0 : item["header-attribute-id"])) || "" : (item == null ? void 0 : item["header-name"]) || "",
|
|
234
|
+
dataIndex: (item == null ? void 0 : item["header-attribute-id"]) || "",
|
|
235
|
+
width: (item == null ? void 0 : item["header-width"]) || void 0,
|
|
236
|
+
render: (text, record) => {
|
|
237
|
+
var _a, _b, _c, _d;
|
|
238
|
+
if (text && text && typeof text === "string" && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
|
|
239
|
+
try {
|
|
240
|
+
const items = JSON.parse(text);
|
|
241
|
+
if (items == null ? void 0 : items.length) {
|
|
242
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, children: items == null ? void 0 : items.map((item2) => {
|
|
243
|
+
const { FileName, FilePath } = item2 || {};
|
|
244
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
|
|
245
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: FileName }),
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "link", size: "small", onClick: () => download.downloadUrl(FilePath), children: downloadText })
|
|
247
|
+
] });
|
|
248
|
+
}) });
|
|
249
|
+
}
|
|
250
|
+
return "-";
|
|
251
|
+
} catch (error) {
|
|
248
252
|
}
|
|
249
|
-
return
|
|
250
|
-
} catch (error) {
|
|
253
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Space, {});
|
|
251
254
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
if ((item == null ? void 0 : item["show-lang-data-id"]) && otherLangPageId) {
|
|
256
|
+
if (text && text && typeof text === "object" && ((_a = Object.keys(text)) == null ? void 0 : _a.includes("delimiter"))) {
|
|
257
|
+
const { list: list2, delimiter = "," } = text || {};
|
|
258
|
+
const newList = list2 == null ? void 0 : list2.map((item2) => {
|
|
259
|
+
const arr = (item2 == null ? void 0 : item2.split("|")) || [];
|
|
260
|
+
const pageId = (arr == null ? void 0 : arr.length) > 1 ? arr[0] : objDefaultLangPageId;
|
|
261
|
+
const str = (arr == null ? void 0 : arr.length) > 1 ? arr[1] : arr[0];
|
|
262
|
+
return getTitle == null ? void 0 : getTitle(pageId, str);
|
|
263
|
+
});
|
|
264
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { dangerouslySetInnerHTML: { __html: ((_b = newList == null ? void 0 : newList.join(delimiter)) == null ? void 0 : _b.replace(/br/g, "<br>")) || "-" } });
|
|
265
|
+
}
|
|
266
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { cursor: "pointer" }, children: getTitle == null ? void 0 : getTitle(otherLangPageId, text ?? "-") }) });
|
|
267
|
+
}
|
|
268
|
+
if (text && text && typeof text === "object" && ((_c = Object.keys(text)) == null ? void 0 : _c.includes("delimiter"))) {
|
|
256
269
|
const { list: list2, delimiter = "," } = text || {};
|
|
257
|
-
|
|
258
|
-
const arr = (item2 == null ? void 0 : item2.split("|")) || [];
|
|
259
|
-
const pageId = (arr == null ? void 0 : arr.length) > 1 ? arr[0] : objDefaultLangPageId;
|
|
260
|
-
const str = (arr == null ? void 0 : arr.length) > 1 ? arr[1] : arr[0];
|
|
261
|
-
return getTitle == null ? void 0 : getTitle(pageId, str);
|
|
262
|
-
});
|
|
263
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { dangerouslySetInnerHTML: { __html: ((_b = newList == null ? void 0 : newList.join(delimiter)) == null ? void 0 : _b.replace(/br/g, "<br>")) || "-" } });
|
|
270
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { dangerouslySetInnerHTML: { __html: ((_d = list2 == null ? void 0 : list2.join(delimiter)) == null ? void 0 : _d.replace(/br/g, "<br>")) || "-" } });
|
|
264
271
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
272
|
+
const mulAttrStyle = item == null ? void 0 : item["header-mul-attribute-st@yle"];
|
|
273
|
+
if (mulAttrStyle) {
|
|
274
|
+
const { style } = mulAttrStyle;
|
|
275
|
+
const matchKey = (mulAttrStyle == null ? void 0 : mulAttrStyle["match-key"]) || [];
|
|
276
|
+
const matchValue = (mulAttrStyle == null ? void 0 : mulAttrStyle["match-value"]) || [];
|
|
277
|
+
if (matchKey && matchValue && style && Array.isArray(matchKey) && Array.isArray(matchValue)) {
|
|
278
|
+
const isMatch = matchValue.some((valueGroup) => {
|
|
279
|
+
return matchKey.every((key, index) => {
|
|
280
|
+
const recordValue = record[key];
|
|
281
|
+
return valueGroup.includes(recordValue);
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
if (isMatch) {
|
|
285
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style, children: text ?? "-" });
|
|
286
|
+
}
|
|
287
|
+
return text ?? "-";
|
|
288
|
+
}
|
|
289
|
+
if (style) {
|
|
290
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style, children: text ?? "-" });
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return text ?? "-";
|
|
270
294
|
}
|
|
271
|
-
|
|
295
|
+
};
|
|
296
|
+
const mulAttrConfig = item == null ? void 0 : item["header-mul-attribute-id"];
|
|
297
|
+
const showBtn = item == null ? void 0 : item["show-btn"];
|
|
298
|
+
if (mulAttrConfig && mulAttrConfig.list && Array.isArray(mulAttrConfig.list)) {
|
|
299
|
+
column.render = (_, record) => {
|
|
300
|
+
var _a;
|
|
301
|
+
const { list: list2, delimiter = "," } = mulAttrConfig;
|
|
302
|
+
const values = list2.map((attrId) => {
|
|
303
|
+
if (!attrId)
|
|
304
|
+
return "";
|
|
305
|
+
return record[attrId] ?? "";
|
|
306
|
+
}).filter((val) => val !== "");
|
|
307
|
+
const content = (values == null ? void 0 : values.join(delimiter)) ?? "-";
|
|
308
|
+
if (showBtn && extraBtn) {
|
|
309
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
310
|
+
content ?? "-",
|
|
311
|
+
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
312
|
+
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
313
|
+
] });
|
|
314
|
+
}
|
|
315
|
+
return content || "-";
|
|
316
|
+
};
|
|
272
317
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
column.render = (_, record) => {
|
|
278
|
-
var _a;
|
|
279
|
-
const { list: list2, delimiter = "," } = mulAttrConfig;
|
|
280
|
-
const values = list2.map((attrId) => {
|
|
281
|
-
if (!attrId)
|
|
282
|
-
return "";
|
|
283
|
-
return record[attrId] ?? "";
|
|
284
|
-
}).filter((val) => val !== "");
|
|
285
|
-
const content = (values == null ? void 0 : values.join(delimiter)) ?? "-";
|
|
286
|
-
if (showBtn && extraBtn) {
|
|
318
|
+
if (showBtn && extraBtn) {
|
|
319
|
+
column.render = (_, record) => {
|
|
320
|
+
var _a;
|
|
321
|
+
const content = record[column.dataIndex] || "";
|
|
287
322
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
288
|
-
content
|
|
323
|
+
content || "-",
|
|
289
324
|
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
290
325
|
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
291
326
|
] });
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const content = record[column.dataIndex] || "";
|
|
299
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
300
|
-
content || "-",
|
|
301
|
-
typeof extraBtn === "function" ? extraBtn(record, content, item) : null,
|
|
302
|
-
typeof extraBtn === "object" ? (_a = extraBtn == null ? void 0 : extraBtn[item == null ? void 0 : item["header-attribute-id"]]) == null ? void 0 : _a.call(extraBtn, record, content, item) : null
|
|
303
|
-
] });
|
|
304
|
-
};
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
return column;
|
|
330
|
+
});
|
|
331
|
+
if (operationColumnConfig && (list == null ? void 0 : list.length)) {
|
|
332
|
+
list.push(operationColumnConfig);
|
|
305
333
|
}
|
|
306
|
-
return
|
|
307
|
-
})
|
|
308
|
-
if (operationColumnConfig && (list == null ? void 0 : list.length)) {
|
|
309
|
-
list.push(operationColumnConfig);
|
|
334
|
+
return list;
|
|
335
|
+
} catch (error) {
|
|
310
336
|
}
|
|
311
|
-
return list;
|
|
312
337
|
};
|
|
313
338
|
const handleSortByHeaderNumber = (arr) => {
|
|
314
339
|
return arr.slice().sort((a, b) => {
|