ss-component-new 1.3.615 → 1.3.616
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/{array-CKTk7Sq_.js → array-B7zhh661.js} +2 -2
- package/dist/{iconfont-DZGSkx-_.js → iconfont-BnmSp7qc.js} +396 -247
- package/dist/{index-Cn33Gz2z.js → index-B8KEncMz.js} +21 -15
- package/dist/{index-obXIOkF7.js → index-BB-4cx6M.js} +1 -1
- package/dist/{index-DAs4L0hx.js → index-BcmwtTXG.js} +1 -1
- package/dist/{index-t9LvhXac.js → index-CZGJIvyy.js} +1 -1
- package/dist/{index-tniD_xHN.js → index-Cm8PZAB-.js} +2 -2
- package/dist/{index-BJFXtH-X.js → index-D6d2WMUQ.js} +1 -1
- package/dist/{index-DjSJhlad.js → index-DCQMsqSL.js} +3 -3
- package/dist/{index-Dd-8nw2f.js → index-DLGS4MnS.js} +2 -2
- package/dist/{index--FPbFJB2.js → index-DRpUuthr.js} +1 -1
- package/dist/{index-BmaW6Me9.js → index-SQa7vB3n.js} +1 -1
- package/dist/{index-gXFBfuoD.js → index-ai2FZBc1.js} +2 -2
- package/dist/{index-cYgzND1g.js → index-v9NjEtsA.js} +5062 -5011
- package/dist/{main-DgwLoFSd.js → main-DaQzJVV5.js} +2 -2
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-Df46gQvy.js → threeModel-DgRu_LfA.js} +1 -1
- package/dist/{threePreview-C4Ra7sjU.js → threePreview-CVO6XMIe.js} +555 -555
- package/dist/threeSceneView-DkImpdm3.js +1291 -0
- package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-7gyDxeiN.js} +201 -201
- package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-7_x3jeap.js} +20 -20
- package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-BBXv1FPJ.js} +1 -1
- package/dist/urdfTree-D0Iom75E.js +254 -0
- package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-DEEMKY1v.js} +1 -1
- package/package.json +1 -1
- package/dist/threeSceneView-tLPMhgrS.js +0 -1291
- package/dist/urdfTree-Bu7OVUsr.js +0 -404
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
import { ref as b, defineComponent as O, watch as U, onMounted as X, onUnmounted as Y, createElementBlock as F, openBlock as E, Fragment as Z, renderList as $, createElementVNode as P, createCommentVNode as G, toDisplayString as V, computed as T, resolveComponent as W, createVNode as H } from "vue";
|
|
2
|
-
import { V as d, B as R, h as I, e as L, k as Q, l as j, m as D, E as B } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
|
|
3
|
-
import { c as z } from "./iconfont-DZGSkx-_.js";
|
|
4
|
-
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
function Ce(p, u) {
|
|
6
|
-
const r = b(!1);
|
|
7
|
-
let c = null, m = 12700, h = new d(), y = new d(), a = new d(), x = 0, g = null;
|
|
8
|
-
const v = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, k = (e) => {
|
|
9
|
-
const n = new d(), o = x * 1.2, f = new d(a.x + o, a.y, a.z), M = new d(a.x, a.y + o, a.z), C = new d(a.x, a.y - o, a.z);
|
|
10
|
-
if (e <= 0.567) {
|
|
11
|
-
const _ = e / 0.567 * Math.PI * 2;
|
|
12
|
-
n.x = a.x + Math.cos(_) * o, n.z = a.z + Math.sin(_) * o, n.y = a.y;
|
|
13
|
-
} else if (e <= 0.724) {
|
|
14
|
-
const w = (e - 0.567) / 0.157, _ = v(w);
|
|
15
|
-
n.lerpVectors(f, M, _);
|
|
16
|
-
} else if (e <= 0.881) {
|
|
17
|
-
const w = (e - 0.724) / 0.157, A = v(w) * Math.PI;
|
|
18
|
-
n.x = a.x + Math.sin(A) * o, n.y = a.y + Math.cos(A) * o, n.z = a.z;
|
|
19
|
-
} else {
|
|
20
|
-
const w = (e - 0.881) / 0.119, _ = v(w);
|
|
21
|
-
n.lerpVectors(C, h, _);
|
|
22
|
-
}
|
|
23
|
-
return n;
|
|
24
|
-
}, l = () => {
|
|
25
|
-
const { camera: e, controls: n } = p();
|
|
26
|
-
if (!e || !n) return;
|
|
27
|
-
c || (c = Date.now());
|
|
28
|
-
const o = Date.now() - c, f = Math.min(o / m, 1);
|
|
29
|
-
if (f >= 1) {
|
|
30
|
-
i();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const M = k(f);
|
|
34
|
-
e.position.copy(M), e.lookAt(a), n.target.copy(a), g = requestAnimationFrame(l);
|
|
35
|
-
}, t = () => {
|
|
36
|
-
if (u.value.length === 0) return;
|
|
37
|
-
const { camera: e, controls: n } = p();
|
|
38
|
-
if (!e || !n) return;
|
|
39
|
-
h.copy(e.position), y.copy(n.target);
|
|
40
|
-
const o = new R();
|
|
41
|
-
u.value.forEach((J) => {
|
|
42
|
-
o.expandByObject(J);
|
|
43
|
-
});
|
|
44
|
-
const f = o.getSize(new d());
|
|
45
|
-
a = o.getCenter(new d()), x = Math.max(f.x, f.y, f.z) * 1.2;
|
|
46
|
-
const M = new d(a.x + x * 1.2, a.y, a.z);
|
|
47
|
-
n.enabled = !1;
|
|
48
|
-
const C = e.position.clone(), w = 1e3, _ = Date.now(), A = () => {
|
|
49
|
-
const J = Date.now() - _, S = Math.min(J / w, 1), K = v(S);
|
|
50
|
-
e.position.lerpVectors(C, M, K), e.lookAt(a), n.target.copy(a), S < 1 ? requestAnimationFrame(A) : (r.value = !0, c = null, l());
|
|
51
|
-
};
|
|
52
|
-
A();
|
|
53
|
-
}, i = () => {
|
|
54
|
-
r.value = !1, c = null, g && (cancelAnimationFrame(g), g = null);
|
|
55
|
-
const { controls: e } = p();
|
|
56
|
-
e && (e.enabled = !0, e.target.copy(y));
|
|
57
|
-
};
|
|
58
|
-
return {
|
|
59
|
-
isAnimating: r,
|
|
60
|
-
toggleAnimation: () => {
|
|
61
|
-
if (r.value) {
|
|
62
|
-
r.value = !1, c = null, g && (cancelAnimationFrame(g), g = null);
|
|
63
|
-
const { camera: e, controls: n } = p();
|
|
64
|
-
if (!e || !n) return;
|
|
65
|
-
n.enabled = !0;
|
|
66
|
-
const o = e.position.clone(), f = n.target.clone(), M = 1500, C = Date.now(), w = () => {
|
|
67
|
-
const _ = Date.now() - C, A = Math.min(_ / M, 1), J = v(A);
|
|
68
|
-
e.position.lerpVectors(o, h, J), n.target.lerpVectors(f, y, J), A < 1 && requestAnimationFrame(w);
|
|
69
|
-
};
|
|
70
|
-
w();
|
|
71
|
-
} else
|
|
72
|
-
t();
|
|
73
|
-
},
|
|
74
|
-
startAnimation: t,
|
|
75
|
-
stopAnimation: i
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function Ae(p, u) {
|
|
79
|
-
const r = b(!1), c = b("none");
|
|
80
|
-
let m = [], h = [], y = new R(), a = new d();
|
|
81
|
-
const x = () => {
|
|
82
|
-
m = [
|
|
83
|
-
new D(new d(1, 0, 0), 0),
|
|
84
|
-
// X轴平面
|
|
85
|
-
new D(new d(0, 1, 0), 0),
|
|
86
|
-
// Y轴平面
|
|
87
|
-
new D(new d(0, 0, 1), 0)
|
|
88
|
-
// Z轴平面
|
|
89
|
-
];
|
|
90
|
-
}, g = () => {
|
|
91
|
-
y.makeEmpty(), u.value.forEach((s) => {
|
|
92
|
-
y.expandByObject(s);
|
|
93
|
-
}), a = y.getCenter(new d());
|
|
94
|
-
}, v = (s) => {
|
|
95
|
-
const e = y.getSize(new d());
|
|
96
|
-
let n, o, f;
|
|
97
|
-
s === z.X ? (n = new L(e.z * 1.2, e.y * 1.2), o = new d(a.x, a.y, a.z), f = new B(0, Math.PI / 2, 0)) : s === z.Y ? (n = new L(e.x * 1.2, e.z * 1.2), o = new d(a.x, a.y, a.z), f = new B(Math.PI / 2, 0, 0)) : s === z.Z && (n = new L(e.x * 1.2, e.y * 1.2), o = new d(a.x, a.y, a.z), f = new B(0, 0, 0));
|
|
98
|
-
const M = new Q({
|
|
99
|
-
color: 8900331,
|
|
100
|
-
transparent: !0,
|
|
101
|
-
opacity: 0.3,
|
|
102
|
-
side: j,
|
|
103
|
-
depthWrite: !1
|
|
104
|
-
}), C = new I(n, M);
|
|
105
|
-
return o && C.position.copy(o), f && C.rotation.copy(f), C;
|
|
106
|
-
}, k = () => {
|
|
107
|
-
if (l(), t(), c.value === "none")
|
|
108
|
-
return;
|
|
109
|
-
g();
|
|
110
|
-
let s = null;
|
|
111
|
-
if (c.value === z.X ? (m[0].constant = -a.x, s = m[0]) : c.value === z.Y ? (m[1].constant = -a.y, s = m[1]) : c.value === z.Z && (m[2].constant = -a.z, s = m[2]), s) {
|
|
112
|
-
u.value.forEach((n) => {
|
|
113
|
-
n.traverse((o) => {
|
|
114
|
-
o instanceof I && o.isMesh && o.material && (Array.isArray(o.material) ? o.material.forEach((f) => {
|
|
115
|
-
f.clippingPlanes = [s];
|
|
116
|
-
}) : o.material.clippingPlanes = [s]);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
const { scene: e } = p();
|
|
120
|
-
if (e) {
|
|
121
|
-
const n = v(c.value);
|
|
122
|
-
e.add(n), h.push(n);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}, l = () => {
|
|
126
|
-
u.value.forEach((s) => {
|
|
127
|
-
s.traverse((e) => {
|
|
128
|
-
e instanceof I && e.isMesh && e.material && (Array.isArray(e.material) ? e.material.forEach((n) => {
|
|
129
|
-
n.clippingPlanes = [];
|
|
130
|
-
}) : e.material.clippingPlanes = []);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
}, t = () => {
|
|
134
|
-
const { scene: s } = p();
|
|
135
|
-
s && h.forEach((e) => {
|
|
136
|
-
s.remove(e), e.geometry.dispose(), Array.isArray(e.material) ? e.material.forEach((n) => {
|
|
137
|
-
n.dispose();
|
|
138
|
-
}) : e.material.dispose();
|
|
139
|
-
}), h = [];
|
|
140
|
-
};
|
|
141
|
-
return {
|
|
142
|
-
isClipping: r,
|
|
143
|
-
activeClippingAxis: c,
|
|
144
|
-
toggleClipping: () => {
|
|
145
|
-
r.value = !r.value, r.value ? (x(), u.value.length > 0 && g()) : (c.value = "none", l(), t());
|
|
146
|
-
},
|
|
147
|
-
updateClippingPlanes: k,
|
|
148
|
-
clearClippingPlanes: l,
|
|
149
|
-
clearClippingMeshes: t
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
const ee = (p, u) => {
|
|
153
|
-
if (!u)
|
|
154
|
-
return null;
|
|
155
|
-
const r = p.joints[u];
|
|
156
|
-
return r || null;
|
|
157
|
-
}, ke = (p, u) => {
|
|
158
|
-
if (!u)
|
|
159
|
-
return null;
|
|
160
|
-
const r = ee(p, u);
|
|
161
|
-
if (!r)
|
|
162
|
-
return null;
|
|
163
|
-
let c = null;
|
|
164
|
-
return r.traverse((m) => {
|
|
165
|
-
m instanceof I && !c && (c = m);
|
|
166
|
-
}), c;
|
|
167
|
-
}, te = (p, u) => {
|
|
168
|
-
if (!u)
|
|
169
|
-
return null;
|
|
170
|
-
const r = p.links[u];
|
|
171
|
-
return r || null;
|
|
172
|
-
}, Fe = (p, u) => {
|
|
173
|
-
if (!u)
|
|
174
|
-
return null;
|
|
175
|
-
const r = te(p, u);
|
|
176
|
-
if (!r)
|
|
177
|
-
return null;
|
|
178
|
-
let c = null;
|
|
179
|
-
return r.traverse((m) => {
|
|
180
|
-
m instanceof I && !c && (c = m);
|
|
181
|
-
}), c;
|
|
182
|
-
}, q = (p) => {
|
|
183
|
-
const u = p.joints;
|
|
184
|
-
return Object.values(u);
|
|
185
|
-
}, Ee = (p) => q(p).filter((c) => c.jointType !== "fixed"), Je = (p) => {
|
|
186
|
-
const u = p.links;
|
|
187
|
-
return Object.keys(u);
|
|
188
|
-
}, ne = { class: "panel-content" }, se = {
|
|
189
|
-
key: 0,
|
|
190
|
-
class: "joints-list"
|
|
191
|
-
}, ae = { class: "joint-info-row" }, oe = { class: "joint-left" }, ie = { class: "joint-name" }, re = { class: "joint-range" }, le = { class: "joint-type" }, ce = {
|
|
192
|
-
key: 0,
|
|
193
|
-
class: "joint-control-row"
|
|
194
|
-
}, ue = { class: "slider-container" }, pe = ["min", "max", "value", "onInput"], me = { class: "value-display" }, de = { class: "joint-value" }, fe = { class: "unit" }, ge = {
|
|
195
|
-
key: 1,
|
|
196
|
-
class: "empty-state"
|
|
197
|
-
}, he = /* @__PURE__ */ O({
|
|
198
|
-
__name: "urdfJointPanel",
|
|
199
|
-
props: {
|
|
200
|
-
model: {}
|
|
201
|
-
},
|
|
202
|
-
setup(p, { expose: u }) {
|
|
203
|
-
const r = p, c = b([]), m = b(null), h = (l, t = !1) => l === "revolute" ? t ? Math.PI : -Math.PI : l === "prismatic" ? t ? 1 : -1 : 0, y = (l) => {
|
|
204
|
-
if (!l || !l.joints)
|
|
205
|
-
return console.warn("URDF模型无效或不包含关节信息"), [];
|
|
206
|
-
const t = [];
|
|
207
|
-
return q(l).forEach((s) => {
|
|
208
|
-
var n, o;
|
|
209
|
-
if (s.jointType === "fixed")
|
|
210
|
-
return;
|
|
211
|
-
let e = {
|
|
212
|
-
lower: ((n = s.limit) == null ? void 0 : n.lower) ?? h(s.jointType, !1),
|
|
213
|
-
upper: ((o = s.limit) == null ? void 0 : o.upper) ?? h(s.jointType, !0)
|
|
214
|
-
};
|
|
215
|
-
s.jointType === "continuous" && (e = {
|
|
216
|
-
lower: -10 * Math.PI,
|
|
217
|
-
upper: 10 * Math.PI
|
|
218
|
-
}), t.push({
|
|
219
|
-
name: s.name,
|
|
220
|
-
type: s.jointType || "unknown",
|
|
221
|
-
limit: e,
|
|
222
|
-
currentValue: s.angle || 0,
|
|
223
|
-
urdfJoint: s
|
|
224
|
-
});
|
|
225
|
-
}), t;
|
|
226
|
-
}, a = (l, t) => {
|
|
227
|
-
var n;
|
|
228
|
-
const i = c.value.find((o) => o.name === l);
|
|
229
|
-
if (!i) return;
|
|
230
|
-
const s = parseFloat(t), e = Math.max(i.limit.lower, Math.min(i.limit.upper, s));
|
|
231
|
-
i.currentValue = e, (n = r.model) != null && n.setJointValue ? r.model.setJointValue(l, e) : i.urdfJoint.setJointValue(e);
|
|
232
|
-
}, x = () => {
|
|
233
|
-
c.value.forEach((l) => {
|
|
234
|
-
(l.type === "revolute" || l.type === "continuous" || l.type === "prismatic") && a(l.name, 0);
|
|
235
|
-
});
|
|
236
|
-
}, g = () => {
|
|
237
|
-
r.model && c.value.forEach((l) => {
|
|
238
|
-
l.urdfJoint.angle !== void 0 && l.currentValue !== l.urdfJoint.angle && (l.currentValue = l.urdfJoint.angle);
|
|
239
|
-
});
|
|
240
|
-
}, v = () => {
|
|
241
|
-
const l = () => {
|
|
242
|
-
g(), m.value = requestAnimationFrame(l);
|
|
243
|
-
};
|
|
244
|
-
l();
|
|
245
|
-
}, k = () => {
|
|
246
|
-
m.value && (cancelAnimationFrame(m.value), m.value = null);
|
|
247
|
-
};
|
|
248
|
-
return U(
|
|
249
|
-
() => r.model,
|
|
250
|
-
(l) => {
|
|
251
|
-
l ? c.value = y(l) : c.value = [];
|
|
252
|
-
},
|
|
253
|
-
{ immediate: !0 }
|
|
254
|
-
), X(() => {
|
|
255
|
-
v();
|
|
256
|
-
}), Y(() => {
|
|
257
|
-
k();
|
|
258
|
-
}), u({
|
|
259
|
-
resetAllJoints: x
|
|
260
|
-
}), (l, t) => (E(), F("div", ne, [
|
|
261
|
-
c.value.length > 0 ? (E(), F("div", se, [
|
|
262
|
-
(E(!0), F(Z, null, $(c.value, (i) => (E(), F("div", {
|
|
263
|
-
key: i.name,
|
|
264
|
-
class: "joint-item"
|
|
265
|
-
}, [
|
|
266
|
-
P("div", ae, [
|
|
267
|
-
P("div", oe, [
|
|
268
|
-
P("span", ie, V(i.name), 1),
|
|
269
|
-
P("span", re, " [" + V(i.limit.lower.toFixed(2)) + ", " + V(i.limit.upper.toFixed(2)) + "] ", 1)
|
|
270
|
-
]),
|
|
271
|
-
P("span", le, V(i.type), 1)
|
|
272
|
-
]),
|
|
273
|
-
i.type === "revolute" || i.type === "prismatic" || i.type === "continuous" ? (E(), F("div", ce, [
|
|
274
|
-
P("div", ue, [
|
|
275
|
-
P("input", {
|
|
276
|
-
type: "range",
|
|
277
|
-
min: i.limit.lower,
|
|
278
|
-
max: i.limit.upper,
|
|
279
|
-
step: "0.001",
|
|
280
|
-
value: i.currentValue,
|
|
281
|
-
onInput: (s) => a(i.name, s.target.value),
|
|
282
|
-
class: "joint-slider"
|
|
283
|
-
}, null, 40, pe)
|
|
284
|
-
]),
|
|
285
|
-
P("div", me, [
|
|
286
|
-
P("span", de, V(i.currentValue ? Number(i.currentValue).toFixed(3) : "0.000"), 1),
|
|
287
|
-
P("span", fe, V(i.type === "prismatic" ? "m" : "rad"), 1)
|
|
288
|
-
])
|
|
289
|
-
])) : G("", !0)
|
|
290
|
-
]))), 128))
|
|
291
|
-
])) : (E(), F("div", ge, t[0] || (t[0] = [
|
|
292
|
-
P("p", null, "未检测到可控制的关节", -1)
|
|
293
|
-
])))
|
|
294
|
-
]));
|
|
295
|
-
}
|
|
296
|
-
}), Ve = /* @__PURE__ */ N(he, [["__scopeId", "data-v-b1467983"]]), ye = { class: "panel-content" }, ve = "id", we = {
|
|
297
|
-
__name: "urdfTree",
|
|
298
|
-
props: {
|
|
299
|
-
model: Object,
|
|
300
|
-
maxExpandCount: {
|
|
301
|
-
type: Number,
|
|
302
|
-
default: 10
|
|
303
|
-
},
|
|
304
|
-
expandStrategy: {
|
|
305
|
-
type: String,
|
|
306
|
-
default: "breadth",
|
|
307
|
-
validator: (p) => ["breadth", "firstLevel"].includes(p)
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
emits: ["nodeClick"],
|
|
311
|
-
setup(p, { emit: u }) {
|
|
312
|
-
const r = p, c = u, m = b([]), h = {
|
|
313
|
-
children: "children",
|
|
314
|
-
label: "label"
|
|
315
|
-
}, y = (t) => {
|
|
316
|
-
c("nodeClick", t);
|
|
317
|
-
}, a = (t, i = 0) => {
|
|
318
|
-
const s = [];
|
|
319
|
-
return Array.isArray(t) && (t == null ? void 0 : t.length) > 0 && t.forEach((e) => {
|
|
320
|
-
if (!(e != null && e.isMesh) && ((e == null ? void 0 : e.type) === "URDFJoint" || (e == null ? void 0 : e.type) === "URDFLink")) {
|
|
321
|
-
const n = {
|
|
322
|
-
name: e == null ? void 0 : e.name,
|
|
323
|
-
label: e == null ? void 0 : e.name,
|
|
324
|
-
show: !0,
|
|
325
|
-
level: i + 1,
|
|
326
|
-
isPenultimate: !1,
|
|
327
|
-
type: e == null ? void 0 : e.type,
|
|
328
|
-
id: e == null ? void 0 : e.id,
|
|
329
|
-
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
330
|
-
children: a(e == null ? void 0 : e.children, i + 1),
|
|
331
|
-
path: e == null ? void 0 : e.name
|
|
332
|
-
};
|
|
333
|
-
s.push(n);
|
|
334
|
-
}
|
|
335
|
-
}), s;
|
|
336
|
-
}, x = (t) => t ? [{
|
|
337
|
-
name: t == null ? void 0 : t.name,
|
|
338
|
-
label: t == null ? void 0 : t.name,
|
|
339
|
-
show: !0,
|
|
340
|
-
level: 1,
|
|
341
|
-
isPenultimate: !1,
|
|
342
|
-
type: t == null ? void 0 : t.type,
|
|
343
|
-
id: t == null ? void 0 : t.id,
|
|
344
|
-
limit: (t == null ? void 0 : t.limit) ?? "",
|
|
345
|
-
children: a(t == null ? void 0 : t.children, 1) || [],
|
|
346
|
-
path: t == null ? void 0 : t.name
|
|
347
|
-
}] : [], g = (t, i) => {
|
|
348
|
-
const s = [], e = [...t];
|
|
349
|
-
for (; e.length > 0 && s.length < i; ) {
|
|
350
|
-
const n = e.shift();
|
|
351
|
-
n.children && n.children.length > 0 && (s.push(n.id), e.push(...n.children));
|
|
352
|
-
}
|
|
353
|
-
return s;
|
|
354
|
-
}, v = (t, i) => {
|
|
355
|
-
const s = [];
|
|
356
|
-
return t.forEach((e) => {
|
|
357
|
-
if (e.children && e.children.length > 0) {
|
|
358
|
-
s.push(e.id);
|
|
359
|
-
const n = e.children.filter((o) => o.children && o.children.length > 0).slice(0, i).map((o) => o.id);
|
|
360
|
-
s.push(...n);
|
|
361
|
-
}
|
|
362
|
-
}), s.slice(0, i + 1);
|
|
363
|
-
}, k = T(() => !m.value || m.value.length === 0 ? [] : r.expandStrategy === "firstLevel" ? v(m.value, r.maxExpandCount) : g(m.value, r.maxExpandCount)), l = T(() => [{
|
|
364
|
-
name: "场景",
|
|
365
|
-
label: "场景",
|
|
366
|
-
show: !0,
|
|
367
|
-
level: 1,
|
|
368
|
-
isPenultimate: !1,
|
|
369
|
-
type: "场景",
|
|
370
|
-
id: "场景",
|
|
371
|
-
children: r != null && r.model ? x(r.model) : [],
|
|
372
|
-
path: "场景"
|
|
373
|
-
}]);
|
|
374
|
-
return U(
|
|
375
|
-
l,
|
|
376
|
-
(t) => {
|
|
377
|
-
m.value = JSON.parse(JSON.stringify(t));
|
|
378
|
-
},
|
|
379
|
-
{ immediate: !0 }
|
|
380
|
-
), (t, i) => {
|
|
381
|
-
const s = W("el-tree");
|
|
382
|
-
return E(), F("div", ye, [
|
|
383
|
-
H(s, {
|
|
384
|
-
data: m.value,
|
|
385
|
-
props: h,
|
|
386
|
-
"default-expanded-keys": k.value,
|
|
387
|
-
"node-key": ve,
|
|
388
|
-
onNodeClick: y
|
|
389
|
-
}, null, 8, ["data", "default-expanded-keys"])
|
|
390
|
-
]);
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
}, ze = /* @__PURE__ */ N(we, [["__scopeId", "data-v-cfde50c3"]]);
|
|
394
|
-
export {
|
|
395
|
-
Ve as J,
|
|
396
|
-
ze as U,
|
|
397
|
-
ke as a,
|
|
398
|
-
Je as b,
|
|
399
|
-
ee as c,
|
|
400
|
-
Ae as d,
|
|
401
|
-
Fe as e,
|
|
402
|
-
Ee as g,
|
|
403
|
-
Ce as u
|
|
404
|
-
};
|