dform-designer 2.2.23 → 2.2.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.
- package/dist/form/FormDesign.es.js +15 -24
- package/package.json +1 -1
|
@@ -103133,37 +103133,28 @@ const YOt = /* @__PURE__ */ Nr({
|
|
|
103133
103133
|
}
|
|
103134
103134
|
}
|
|
103135
103135
|
const d = se(() => {
|
|
103136
|
-
var
|
|
103137
|
-
if (!((
|
|
103138
|
-
const f = ((
|
|
103139
|
-
(
|
|
103140
|
-
const
|
|
103141
|
-
value:
|
|
103136
|
+
var x, O, D, A, V;
|
|
103137
|
+
if (!((x = s.value) != null && x.length)) return [];
|
|
103138
|
+
const f = ((D = (O = n.column) == null ? void 0 : O.viewInfo) == null ? void 0 : D.levelSet) || {}, g = (f == null ? void 0 : f.field) || "parentId", h = ((A = n.column) == null ? void 0 : A.fieldTitle) || "title", m = "id", p = /* @__PURE__ */ new Map(), w = [];
|
|
103139
|
+
return (V = s.value) == null || V.forEach((P) => {
|
|
103140
|
+
const I = {
|
|
103141
|
+
value: P[m],
|
|
103142
103142
|
// 使用配置的ID字段
|
|
103143
|
-
label:
|
|
103143
|
+
label: P[h] || "未命名",
|
|
103144
103144
|
// 使用配置的标签字段
|
|
103145
|
-
parent:
|
|
103145
|
+
parent: P[g],
|
|
103146
103146
|
// 使用配置的父字段
|
|
103147
103147
|
children: [],
|
|
103148
|
-
raw:
|
|
103148
|
+
raw: P
|
|
103149
103149
|
// 保留原始数据
|
|
103150
103150
|
};
|
|
103151
|
-
p.set(
|
|
103152
|
-
})
|
|
103153
|
-
|
|
103154
|
-
|
|
103155
|
-
|
|
103156
|
-
if (N) {
|
|
103157
|
-
let z = N;
|
|
103158
|
-
const B = /* @__PURE__ */ new Set([L.value]);
|
|
103159
|
-
for (; z && z.parent && !B.has(z.parent); )
|
|
103160
|
-
B.add(z.parent), z = p.get(z.parent);
|
|
103161
|
-
B.has(L.value) ? w.push(L) : N.children.push(L);
|
|
103162
|
-
} else
|
|
103163
|
-
w.push(L);
|
|
103151
|
+
p.set(I.value, I), (!P[g] || P[g] === 0) && w.push(I);
|
|
103152
|
+
}), p.forEach((P) => {
|
|
103153
|
+
if (P.parent && P.parent !== P.value) {
|
|
103154
|
+
const I = p.get(P.parent);
|
|
103155
|
+
I ? I.children.push(P) : w.push(P);
|
|
103164
103156
|
}
|
|
103165
|
-
};
|
|
103166
|
-
return p.forEach((L) => x(L)), ((L) => L.sort((N, z) => (N.raw.order || 0) - (z.raw.order || 0)))(w);
|
|
103157
|
+
}), ((P) => P.sort((I, L) => (I.raw.order || 0) - (L.raw.order || 0)))(w);
|
|
103167
103158
|
});
|
|
103168
103159
|
return tn(
|
|
103169
103160
|
() => n.model[n.column.prop],
|