zmdms-webui 1.4.2 → 1.4.3
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.
|
@@ -71,23 +71,32 @@ function tableValidate(dataSource, columns, restParams) {
|
|
|
71
71
|
parseValidateFiledsHandle = function (columns) {
|
|
72
72
|
if (Array.isArray(columns)) {
|
|
73
73
|
columns.forEach(function (column, index) {
|
|
74
|
-
var _a
|
|
74
|
+
var _a;
|
|
75
75
|
if (!isMerge) {
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Reflect.has(mergeColumn, "colSpan"))) {
|
|
76
|
+
// 29259116 这里判断是否有行列合并的逻辑变化一下。认为只要配置中传入了onCell
|
|
77
|
+
// 那就是有合并
|
|
78
|
+
// 因为如果用 column?.onCell?.({}, 1) 这种模式,可能开发会根据record来判断,而这里拿不到record
|
|
79
|
+
// 并且索引也不是所有的情况
|
|
80
|
+
if (column === null || column === void 0 ? void 0 : column.onCell) {
|
|
82
81
|
isMerge = true;
|
|
83
82
|
}
|
|
83
|
+
// // 这里判断需要改动,只需要有rowSpan属性或者colSpan属性就有合并
|
|
84
|
+
// const mergeColumn = column?.onCell?.({}, 1);
|
|
85
|
+
// // if (mergeColumn && (mergeColumn?.rowSpan || mergeColumn?.colSpan)) {
|
|
86
|
+
// if (
|
|
87
|
+
// mergeColumn &&
|
|
88
|
+
// (Reflect.has(mergeColumn, "rowSpan") ||
|
|
89
|
+
// Reflect.has(mergeColumn, "colSpan"))
|
|
90
|
+
// ) {
|
|
91
|
+
// isMerge = true;
|
|
92
|
+
// }
|
|
84
93
|
}
|
|
85
94
|
// 如果有子元素,需要递归往下遍历
|
|
86
95
|
if (Array.isArray(column.children)) {
|
|
87
96
|
parseValidateFiledsHandle(column.children);
|
|
88
97
|
return;
|
|
89
98
|
}
|
|
90
|
-
var _key = ((
|
|
99
|
+
var _key = ((_a = column === null || column === void 0 ? void 0 : column.validate) === null || _a === void 0 ? void 0 : _a.dataIndex)
|
|
91
100
|
? column.validate.dataIndex
|
|
92
101
|
: (column === null || column === void 0 ? void 0 : column.key)
|
|
93
102
|
? column === null || column === void 0 ? void 0 : column.key
|