officialblock 2.1.7 → 2.1.8

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.
@@ -1,609 +0,0 @@
1
- import { getCurrentInstance as A, ref as n, computed as k, watch as B, onMounted as H, nextTick as V, createElementBlock as b, openBlock as i, createElementVNode as r, withDirectives as S, vShow as T, Fragment as U, renderList as D, normalizeClass as P, toDisplayString as O, normalizeStyle as Y, createCommentVNode as R, unref as E, createVNode as q, createBlock as F } from "vue";
2
- import { _ as W, $ as G, r as J } from "./index-DV6KnqfT.mjs";
3
- const K = ["onClick"], Q = {
4
- __name: "VrTourTab",
5
- props: {
6
- list: {
7
- type: Array,
8
- default: () => []
9
- },
10
- currentIdx: {
11
- type: [String, Number],
12
- default: 0
13
- }
14
- },
15
- emits: ["updateIdx"],
16
- setup(I, { emit: L }) {
17
- const { proxy: C } = A(), { $_vsWidth: f } = C, $ = I, v = L, c = n(0), t = n(0), u = n(0), g = n(0), d = n(null), _ = n(null), p = n([]), w = k(() => c.value > 40), x = k(() => u.value + g.value < t.value + 40), l = k({
18
- get() {
19
- return $.currentIdx ?? 0;
20
- },
21
- set(a) {
22
- v("updateIdx", a);
23
- }
24
- });
25
- B(f, () => {
26
- m();
27
- });
28
- const m = () => {
29
- if ($.list.length <= 0) return;
30
- _.value && (c.value = _.value.scrollLeft), d.value && (u.value = d.value.getBoundingClientRect().left, g.value = d.value.getBoundingClientRect().width);
31
- let a = null;
32
- p.value.length > 0 && (a = Array.isArray(p.value) ? p.value[p.value.length - 1] : p.value), a && a.getBoundingClientRect && (t.value = a.getBoundingClientRect().left);
33
- }, s = (a) => {
34
- _.value && (a === "next" ? _.value.scrollLeft += 200 : _.value.scrollLeft -= 200);
35
- }, e = () => {
36
- m();
37
- };
38
- return H(() => {
39
- V(() => {
40
- e();
41
- });
42
- }), (a, y) => (i(), b("div", {
43
- class: "tab-tag",
44
- ref_key: "VrtourWrapper",
45
- ref: d
46
- }, [
47
- r("ul", {
48
- class: "tab-tag__list",
49
- ref_key: "VrtourList",
50
- ref: _,
51
- onScroll: e
52
- }, [
53
- S(r("div", {
54
- class: "tab-tag__nav__prev",
55
- onClick: y[0] || (y[0] = (o) => s("prev"))
56
- }, null, 512), [
57
- [T, w.value]
58
- ]),
59
- (i(!0), b(U, null, D(I.list, (o, h) => (i(), b("li", { key: h }, [
60
- r("button", {
61
- type: "button",
62
- class: P(["tab-tag__btn", { "is-active": l.value == h }]),
63
- ref_for: !0,
64
- ref_key: "VrtourBtn",
65
- ref: p,
66
- onClick: (j) => l.value = h
67
- }, O(o.name), 11, K)
68
- ]))), 128)),
69
- S(r("div", {
70
- class: "tab-tag__nav__next",
71
- onClick: y[1] || (y[1] = (o) => s("next"))
72
- }, null, 512), [
73
- [T, x.value]
74
- ])
75
- ], 544)
76
- ], 512));
77
- }
78
- }, X = /* @__PURE__ */ W(Q, [["__scopeId", "data-v-efdafd78"]]), Z = ["onClick"], ee = {
79
- __name: "VrTourCat",
80
- props: {
81
- list: {
82
- type: Array,
83
- default: () => []
84
- },
85
- currentIdx: {
86
- type: [String, Number],
87
- default: 0
88
- }
89
- },
90
- emits: ["updateIdx"],
91
- setup(I, { emit: L }) {
92
- const { proxy: C } = A(), f = I, $ = L, v = n(null), c = n(null), t = n(null), u = n(0), g = n(0), d = n(0), _ = n(0), p = n(0), w = k(() => u.value > 40), x = k(() => d.value + _.value < g.value + 40), l = k({
93
- get() {
94
- return f.currentIdx ?? 0;
95
- },
96
- set(y) {
97
- $("updateIdx", y), V(a);
98
- }
99
- }), m = () => {
100
- if (f.list.length <= 0) return;
101
- c.value && (u.value = c.value.scrollLeft), v.value && (d.value = v.value.getBoundingClientRect().left, _.value = v.value.getBoundingClientRect().width);
102
- let y = null;
103
- t.value && (y = Array.isArray(t.value) ? t.value[t.value.length - 1] : t.value), y && y.getBoundingClientRect && (g.value = y.getBoundingClientRect().left);
104
- }, s = (y) => {
105
- y == "next" ? c.value.scrollLeft += 200 : c.value.scrollLeft -= 200;
106
- }, e = () => {
107
- c.value && (u.value = c.value.scrollLeft), m();
108
- }, a = async () => {
109
- if (await V(), !t.value || !t.value[l.value]) return;
110
- const y = t.value[l.value], o = y.clientWidth / 2, h = C.$_vsWidth / 2;
111
- p.value = y.getBoundingClientRect().right - o, c.value.scrollLeft -= h - p.value;
112
- };
113
- return B(
114
- () => C.$_vsWidth,
115
- () => {
116
- m();
117
- }
118
- ), B(
119
- () => f.list,
120
- () => {
121
- V(m), c.value && c.value.scrollLeft && (c.value.scrollLeft = 0);
122
- },
123
- { deep: !0 }
124
- ), H(() => {
125
- V(e);
126
- }), (y, o) => (i(), b("div", {
127
- class: "tab-tag",
128
- ref_key: "wrapper",
129
- ref: v
130
- }, [
131
- r("ul", {
132
- class: "tab-tag__list",
133
- ref_key: "list",
134
- ref: c,
135
- onScroll: e
136
- }, [
137
- S(r("div", {
138
- class: "tab-tag__nav__prev",
139
- onClick: o[0] || (o[0] = (h) => s("prev"))
140
- }, null, 512), [
141
- [T, w.value]
142
- ]),
143
- (i(!0), b(U, null, D(c.value, (h, j) => (i(), b("li", {
144
- key: j,
145
- class: "tab-tag__item"
146
- }, [
147
- r("button", {
148
- type: "button",
149
- class: P(["tab-tag__btn", { "is-active": l.value == j }]),
150
- ref_for: !0,
151
- ref_key: "btnRef",
152
- ref: t,
153
- onClick: (N) => l.value = j
154
- }, O(h.name), 11, Z)
155
- ]))), 128)),
156
- S(r("div", {
157
- class: "tab-tag__nav__next",
158
- onClick: o[1] || (o[1] = (h) => s("next"))
159
- }, null, 512), [
160
- [T, x.value]
161
- ])
162
- ], 544)
163
- ], 512));
164
- }
165
- }, M = /* @__PURE__ */ W(ee, [["__scopeId", "data-v-6dd36752"]]), te = { class: "tab-tag__nav__prev" }, se = ["onClick"], le = ["src", "alt"], ne = { class: "tab-tag__btn__title" }, re = { class: "tab-tag__nav__next" }, ae = {
166
- __name: "VrTourChoose",
167
- props: {
168
- list: {
169
- type: Array,
170
- default: () => []
171
- },
172
- currentIdx: {
173
- type: [String, Number],
174
- default: 0
175
- }
176
- },
177
- emits: ["updateIdx"],
178
- setup(I, { emit: L }) {
179
- const { proxy: C } = A(), { $_vsWidth: f } = C, $ = I, v = L, c = n(null), t = n(null), u = n(null), g = n(0), d = n(0), _ = n(0), p = n(0), w = n(0), x = k(() => g.value > 0), l = k(() => d.value - 40 > p.value), m = k({
180
- get() {
181
- return $.currentIdx ?? 0;
182
- },
183
- set(o) {
184
- v("updateIdx", o), V(a);
185
- }
186
- }), s = () => {
187
- var h, j, N;
188
- if ($.list.length <= 0) return;
189
- g.value = (h = t.value) == null ? void 0 : h.scrollLeft, _.value = (j = c.value) == null ? void 0 : j.getBoundingClientRect().left, p.value = (N = c.value) == null ? void 0 : N.getBoundingClientRect().right;
190
- let o = null;
191
- u.value && (o = Array.isArray(u.value) ? u.value[u.value.length - 1] : u.value), d.value = o == null ? void 0 : o.getBoundingClientRect().right;
192
- }, e = (o) => {
193
- o === "next" ? t.value.scrollLeft += 200 : t.value.scrollLeft -= 200;
194
- }, a = () => {
195
- const o = u.value[m.value];
196
- if (!o) return;
197
- const h = o.clientWidth / 2, j = f.value / 2;
198
- w.value = o.getBoundingClientRect().right - h, t.value.scrollLeft -= j - w.value;
199
- }, y = () => {
200
- s();
201
- };
202
- return B(
203
- () => f.value,
204
- () => {
205
- s();
206
- }
207
- ), B(
208
- () => $.list,
209
- () => {
210
- V(s), t.value && t.value.scrollLeft && (t.value.scrollLeft = 0);
211
- }
212
- ), H(() => {
213
- V(y);
214
- }), (o, h) => (i(), b("div", {
215
- class: "vr-tour-choose tab-tag",
216
- ref_key: "wrapper",
217
- ref: c
218
- }, [
219
- r("ul", {
220
- class: "tab-tag__list",
221
- ref_key: "list",
222
- ref: t,
223
- onScroll: y
224
- }, [
225
- S(r("div", te, [
226
- r("button", {
227
- type: "button",
228
- class: "nav__btn",
229
- onClick: h[0] || (h[0] = (j) => e("prev"))
230
- })
231
- ], 512), [
232
- [T, x.value]
233
- ]),
234
- (i(!0), b(U, null, D(t.value, (j, N) => (i(), b("li", {
235
- key: N,
236
- class: "tab-tag__item"
237
- }, [
238
- r("button", {
239
- type: "button",
240
- class: P(["tab-tag__btn", { "is-active": m.value === N }]),
241
- ref_for: !0,
242
- ref_key: "btn",
243
- ref: u,
244
- onClick: (Ve) => m.value = N
245
- }, [
246
- r("img", {
247
- src: j.url,
248
- alt: j.name
249
- }, null, 8, le),
250
- r("div", ne, O(j.name), 1)
251
- ], 10, se)
252
- ]))), 128)),
253
- S(r("div", re, [
254
- r("button", {
255
- type: "button",
256
- class: "nav__btn",
257
- onClick: h[1] || (h[1] = (j) => e("next"))
258
- })
259
- ], 512), [
260
- [T, l.value]
261
- ])
262
- ], 544)
263
- ], 512));
264
- }
265
- }, oe = /* @__PURE__ */ W(ae, [["__scopeId", "data-v-ebb85a22"]]), ce = { class: "vr-tour-scene" }, ue = ["src"], ie = {
266
- key: 1,
267
- class: "vr-tour-scene__img"
268
- }, ve = ["src", "alt"], de = {
269
- __name: "VrTourScene",
270
- props: {
271
- scene: {
272
- type: Object,
273
- default: () => ({})
274
- }
275
- },
276
- setup(I) {
277
- const L = I, C = k(() => {
278
- var v;
279
- return (v = L.scene) == null ? void 0 : v.embed;
280
- }), f = k(() => {
281
- var v;
282
- return (v = L.scene) == null ? void 0 : v.url;
283
- }), $ = k(() => {
284
- var v;
285
- return (v = L.scene) == null ? void 0 : v.name;
286
- });
287
- return (v, c) => (i(), b("div", ce, [
288
- C.value ? (i(), b("iframe", {
289
- key: 0,
290
- src: C.value,
291
- frameborder: "0"
292
- }, null, 8, ue)) : (i(), b("div", ie, [
293
- r("img", {
294
- src: f.value,
295
- alt: $.value
296
- }, null, 8, ve)
297
- ]))
298
- ]));
299
- }
300
- }, pe = /* @__PURE__ */ W(de, [["__scopeId", "data-v-c07507d5"]]), me = { class: "vr-tour-select" }, _e = { class: "select-btn__focus-name line-clamp-1" }, ye = { class: "select-list" }, be = ["onClick"], fe = {
301
- __name: "VrTourSelect",
302
- props: {
303
- list: {
304
- type: Array,
305
- default: () => []
306
- },
307
- currentIdx: {
308
- type: [String, Number],
309
- default: 0
310
- // 原代码默认值是箭头函数,此处简化为直接值(数组/对象才需箭头函数避免共享)
311
- }
312
- },
313
- emits: ["updateIdx"],
314
- setup(I, { emit: L }) {
315
- const { proxy: C } = A(), { $_vsWidth: f } = C, $ = {
316
- mounted(l, m) {
317
- l.clickOutsideEvent = (s) => {
318
- l === s.target || l.contains(s.target) || m.value(s);
319
- }, document.body.addEventListener("click", l.clickOutsideEvent);
320
- },
321
- unmounted(l) {
322
- document.body.removeEventListener("click", l.clickOutsideEvent);
323
- }
324
- }, v = I, c = L, t = n(!1), u = n(-8), g = n(null), d = k({
325
- get() {
326
- return v.currentIdx ?? 0;
327
- },
328
- set(l) {
329
- c("updateIdx", l);
330
- }
331
- }), _ = k(() => {
332
- var l;
333
- return ((l = v.list[d.value]) == null ? void 0 : l.name) || "";
334
- });
335
- B(t, () => {
336
- w();
337
- }), H(() => {
338
- window.addEventListener("resize", () => {
339
- f.value = window.innerWidth, t.value && w();
340
- });
341
- });
342
- const p = () => {
343
- t.value = !1;
344
- }, w = () => {
345
- const l = g.value;
346
- if (!l) return;
347
- const m = G(l).x + l.clientWidth;
348
- m > f.value && (u.value = u.value - m + f.value - 4);
349
- }, x = (l) => {
350
- d.value = l, p();
351
- };
352
- return (l, m) => S((i(), b("div", me, [
353
- r("button", {
354
- type: "button",
355
- class: P(["select-btn", { "is-open": t.value }]),
356
- onClick: m[0] || (m[0] = (s) => t.value = !t.value)
357
- }, [
358
- r("div", _e, O(_.value), 1),
359
- m[1] || (m[1] = r("div", { class: "select-btn__arrow" }, null, -1))
360
- ], 2),
361
- r("div", {
362
- class: P(["select-block", { "is-open": t.value }]),
363
- style: Y({ "--left": `${u.value}px` }),
364
- ref_key: "blockRef",
365
- ref: g
366
- }, [
367
- r("ul", ye, [
368
- (i(!0), b(U, null, D(I.list, (s, e) => (i(), b("li", {
369
- class: P(["select-item line-clamp-1", { "is-active": d.value === e }]),
370
- key: e,
371
- onClick: (a) => x(e)
372
- }, O(s.name), 11, be))), 128))
373
- ])
374
- ], 6)
375
- ])), [
376
- [$, p]
377
- ]);
378
- }
379
- }, z = /* @__PURE__ */ W(fe, [["__scopeId", "data-v-536804a2"]]), ge = { class: "vr-tour__wrapper" }, he = {
380
- key: 0,
381
- class: "vr-tour__tabs"
382
- }, ke = { class: "container-content-middle" }, we = {
383
- key: 1,
384
- class: "vr-tour__selects"
385
- }, xe = { class: "container-content" }, je = { class: "vr-tour__selects__list" }, Ie = { class: "vr-tour__scene" }, Le = {
386
- key: 2,
387
- class: "vr-tour__cats"
388
- }, Ce = { class: "pt-2" }, $e = {
389
- key: 3,
390
- class: "vr-tour__chooses"
391
- }, Se = {
392
- __name: "index",
393
- props: {
394
- modelValue: {
395
- type: Object,
396
- default: () => ({})
397
- }
398
- },
399
- emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
400
- setup(I, { emit: L }) {
401
- const { proxy: C } = A(), { $_vsWidth: f, $_vsScrollY: $, $vsScreenAddListener: v, $vsScreenDestroyListener: c } = C, t = L, u = I, g = n(0), d = n(0), _ = n(0), p = k(() => {
402
- var s;
403
- return ((s = u.modelValue) == null ? void 0 : s.data) ?? null;
404
- }), w = k(() => {
405
- var s, e;
406
- return (e = (s = p.value) == null ? void 0 : s[g.value]) == null ? void 0 : e.categoriesList;
407
- }), x = k(() => {
408
- var s, e;
409
- return (e = (s = w.value) == null ? void 0 : s[d.value]) == null ? void 0 : e.facilitiesList;
410
- }), l = k(() => {
411
- var s;
412
- return (s = x.value) == null ? void 0 : s[_.value];
413
- }), m = () => {
414
- var e;
415
- if (u.modelValue && u.modelValue.data)
416
- return;
417
- const s = {
418
- id: ((e = u.modelValue) == null ? void 0 : e.id) || J(),
419
- //componentKey
420
- type: "VrTour",
421
- onlyShowPc: !1,
422
- containerWidth: "",
423
- bgColor: "",
424
- classes: "custom-class another-class",
425
- style: {},
426
- width: "",
427
- data: [
428
- {
429
- key: "secondary-school",
430
- name: "Secondary School",
431
- categoriesList: [
432
- {
433
- key: "facilities",
434
- name: "Facilities",
435
- facilitiesList: [
436
- {
437
- key: "ece-learning-communities",
438
- name: "ECE Learning Communities",
439
- url: "https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",
440
- scene: null,
441
- embed: "https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"
442
- },
443
- {
444
- key: "primary-learning-communities",
445
- name: "Primary Learning Communities",
446
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5.jpg",
447
- scene: null,
448
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5/tour.html"
449
- },
450
- {
451
- key: "our-libraries",
452
- name: "Our Libraries",
453
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries.jpg",
454
- scene: null,
455
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries/tour.html"
456
- },
457
- {
458
- key: "our-facilities",
459
- name: "Our Facilities",
460
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities.jpg",
461
- scene: null,
462
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities2/tour.html"
463
- },
464
- {
465
- key: "honglingjin-park",
466
- name: "Honglingjin Park",
467
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park.jpg",
468
- scene: null,
469
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park2/tour.html"
470
- },
471
- {
472
- key: "other-public-areas",
473
- name: "Other Public Areas",
474
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus.jpg",
475
- scene: null,
476
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus/tour.html"
477
- }
478
- ]
479
- }
480
- ]
481
- },
482
- {
483
- key: "secondary-school",
484
- name: "Secondary School",
485
- categoriesList: [
486
- {
487
- key: "facilities",
488
- name: "Facilities",
489
- facilitiesList: [
490
- {
491
- key: "ece-learning-communities",
492
- name: "ECE Learning Communities",
493
- url: "https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",
494
- scene: null,
495
- embed: "https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"
496
- },
497
- {
498
- key: "primary-learning-communities",
499
- name: "Primary Learning Communities",
500
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5.jpg",
501
- scene: null,
502
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5/tour.html"
503
- },
504
- {
505
- key: "our-libraries",
506
- name: "Our Libraries",
507
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries.jpg",
508
- scene: null,
509
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries/tour.html"
510
- },
511
- {
512
- key: "our-facilities",
513
- name: "Our Facilities",
514
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities.jpg",
515
- scene: null,
516
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities2/tour.html"
517
- },
518
- {
519
- key: "honglingjin-park",
520
- name: "Honglingjin Park",
521
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park.jpg",
522
- scene: null,
523
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park2/tour.html"
524
- },
525
- {
526
- key: "other-public-areas",
527
- name: "Other Public Areas",
528
- url: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus.jpg",
529
- scene: null,
530
- embed: "https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus/tour.html"
531
- }
532
- ]
533
- }
534
- ]
535
- }
536
- ]
537
- };
538
- t("update:modelValue", s), g.value = 0;
539
- };
540
- return B(g, () => {
541
- d.value = 0;
542
- }), B(d, () => {
543
- _.value = 0;
544
- }), m(), (s, e) => (i(), b("div", {
545
- class: P(["vr-tour bg-neutral-lightest", { "pb-0": x.value && x.value.length <= 1 }])
546
- }, [
547
- r("div", ge, [
548
- p.value && p.value.length > 1 && E(f) >= 768 ? (i(), b("div", he, [
549
- r("div", ke, [
550
- q(X, {
551
- list: p.value,
552
- onUpdateIdx: e[0] || (e[0] = (a) => g.value = a),
553
- currentIdx: g.value
554
- }, null, 8, ["list", "currentIdx"])
555
- ])
556
- ])) : R("", !0),
557
- E(f) < 768 ? (i(), b("div", we, [
558
- r("div", xe, [
559
- r("div", je, [
560
- p.value.length > 1 ? (i(), F(z, {
561
- key: 0,
562
- list: p.value,
563
- onUpdateIdx: e[1] || (e[1] = (a) => g.value = a),
564
- currentIdx: g.value
565
- }, null, 8, ["list", "currentIdx"])) : R("", !0),
566
- w.value.length > 1 ? (i(), F(z, {
567
- key: 1,
568
- list: w.value,
569
- onUpdateIdx: e[2] || (e[2] = (a) => d.value = a),
570
- currentIdx: d.value
571
- }, null, 8, ["list", "currentIdx"])) : R("", !0)
572
- ])
573
- ]),
574
- x.value.length > 1 ? (i(), F(M, {
575
- key: 0,
576
- list: x.value,
577
- onUpdateIdx: e[3] || (e[3] = (a) => _.value = a),
578
- currentIdx: _.value
579
- }, null, 8, ["list", "currentIdx"])) : R("", !0)
580
- ])) : R("", !0),
581
- r("div", Ie, [
582
- q(pe, { scene: l.value }, null, 8, ["scene"])
583
- ]),
584
- w.value && E(f) >= 768 ? (i(), b("div", Le, [
585
- S(r("div", Ce, null, 512), [
586
- [T, w.value.length <= 1 && x.value.length > 1]
587
- ]),
588
- S(q(M, {
589
- list: w.value,
590
- onUpdateIdx: e[4] || (e[4] = (a) => d.value = a),
591
- currentIdx: d.value
592
- }, null, 8, ["list", "currentIdx"]), [
593
- [T, w.value.length > 1]
594
- ])
595
- ])) : R("", !0),
596
- x.value && x.value.length > 1 && E(f) >= 768 ? (i(), b("div", $e, [
597
- q(oe, {
598
- list: x.value,
599
- onUpdateIdx: e[5] || (e[5] = (a) => _.value = a),
600
- currentIdx: _.value
601
- }, null, 8, ["list", "currentIdx"])
602
- ])) : R("", !0)
603
- ])
604
- ], 2));
605
- }
606
- }, Ne = /* @__PURE__ */ W(Se, [["__scopeId", "data-v-f386fe24"]]);
607
- export {
608
- Ne as default
609
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./index-By5KQYOh.js"),N=["onClick"],I={__name:"VrTourTab",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(k,{emit:w}){const{proxy:x}=e.getCurrentInstance(),{$_vsWidth:y}=x,B=k,i=w,c=e.ref(0),l=e.ref(0),a=e.ref(0),f=e.ref(0),u=e.ref(null),m=e.ref(null),d=e.ref([]),b=e.computed(()=>c.value>40),h=e.computed(()=>a.value+f.value<l.value+40),s=e.computed({get(){return B.currentIdx??0},set(r){i("updateIdx",r)}});e.watch(y,()=>{v()});const v=()=>{if(B.list.length<=0)return;m.value&&(c.value=m.value.scrollLeft),u.value&&(a.value=u.value.getBoundingClientRect().left,f.value=u.value.getBoundingClientRect().width);let r=null;d.value.length>0&&(r=Array.isArray(d.value)?d.value[d.value.length-1]:d.value),r&&r.getBoundingClientRect&&(l.value=r.getBoundingClientRect().left)},n=r=>{m.value&&(r==="next"?m.value.scrollLeft+=200:m.value.scrollLeft-=200)},t=()=>{v()};return e.onMounted(()=>{e.nextTick(()=>{t()})}),(r,p)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"VrtourWrapper",ref:u},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"VrtourList",ref:m,onScroll:t},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:p[0]||(p[0]=o=>n("prev"))},null,512),[[e.vShow,b.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.list,(o,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":s.value==_}]),ref_for:!0,ref_key:"VrtourBtn",ref:d,onClick:g=>s.value=_},e.toDisplayString(o.name),11,N)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:p[1]||(p[1]=o=>n("next"))},null,512),[[e.vShow,h.value]])],544)],512))}},L=V._(I,[["__scopeId","data-v-efdafd78"]]),$=["onClick"],S={__name:"VrTourCat",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(k,{emit:w}){const{proxy:x}=e.getCurrentInstance(),y=k,B=w,i=e.ref(null),c=e.ref(null),l=e.ref(null),a=e.ref(0),f=e.ref(0),u=e.ref(0),m=e.ref(0),d=e.ref(0),b=e.computed(()=>a.value>40),h=e.computed(()=>u.value+m.value<f.value+40),s=e.computed({get(){return y.currentIdx??0},set(p){B("updateIdx",p),e.nextTick(r)}}),v=()=>{if(y.list.length<=0)return;c.value&&(a.value=c.value.scrollLeft),i.value&&(u.value=i.value.getBoundingClientRect().left,m.value=i.value.getBoundingClientRect().width);let p=null;l.value&&(p=Array.isArray(l.value)?l.value[l.value.length-1]:l.value),p&&p.getBoundingClientRect&&(f.value=p.getBoundingClientRect().left)},n=p=>{p=="next"?c.value.scrollLeft+=200:c.value.scrollLeft-=200},t=()=>{c.value&&(a.value=c.value.scrollLeft),v()},r=async()=>{if(await e.nextTick(),!l.value||!l.value[s.value])return;const p=l.value[s.value],o=p.clientWidth/2,_=x.$_vsWidth/2;d.value=p.getBoundingClientRect().right-o,c.value.scrollLeft-=_-d.value};return e.watch(()=>x.$_vsWidth,()=>{v()}),e.watch(()=>y.list,()=>{e.nextTick(v),c.value&&c.value.scrollLeft&&(c.value.scrollLeft=0)},{deep:!0}),e.onMounted(()=>{e.nextTick(t)}),(p,o)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:i},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:c,onScroll:t},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:o[0]||(o[0]=_=>n("prev"))},null,512),[[e.vShow,b.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(_,g)=>(e.openBlock(),e.createElementBlock("li",{key:g,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":s.value==g}]),ref_for:!0,ref_key:"btnRef",ref:l,onClick:C=>s.value=g},e.toDisplayString(_.name),11,$)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:o[1]||(o[1]=_=>n("next"))},null,512),[[e.vShow,h.value]])],544)],512))}},E=V._(S,[["__scopeId","data-v-6dd36752"]]),T={class:"tab-tag__nav__prev"},R=["onClick"],D=["src","alt"],O={class:"tab-tag__btn__title"},P={class:"tab-tag__nav__next"},W={__name:"VrTourChoose",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(k,{emit:w}){const{proxy:x}=e.getCurrentInstance(),{$_vsWidth:y}=x,B=k,i=w,c=e.ref(null),l=e.ref(null),a=e.ref(null),f=e.ref(0),u=e.ref(0),m=e.ref(0),d=e.ref(0),b=e.ref(0),h=e.computed(()=>f.value>0),s=e.computed(()=>u.value-40>d.value),v=e.computed({get(){return B.currentIdx??0},set(o){i("updateIdx",o),e.nextTick(r)}}),n=()=>{var _,g,C;if(B.list.length<=0)return;f.value=(_=l.value)==null?void 0:_.scrollLeft,m.value=(g=c.value)==null?void 0:g.getBoundingClientRect().left,d.value=(C=c.value)==null?void 0:C.getBoundingClientRect().right;let o=null;a.value&&(o=Array.isArray(a.value)?a.value[a.value.length-1]:a.value),u.value=o==null?void 0:o.getBoundingClientRect().right},t=o=>{o==="next"?l.value.scrollLeft+=200:l.value.scrollLeft-=200},r=()=>{const o=a.value[v.value];if(!o)return;const _=o.clientWidth/2,g=y.value/2;b.value=o.getBoundingClientRect().right-_,l.value.scrollLeft-=g-b.value},p=()=>{n()};return e.watch(()=>y.value,()=>{n()}),e.watch(()=>B.list,()=>{e.nextTick(n),l.value&&l.value.scrollLeft&&(l.value.scrollLeft=0)}),e.onMounted(()=>{e.nextTick(p)}),(o,_)=>(e.openBlock(),e.createElementBlock("div",{class:"vr-tour-choose tab-tag",ref_key:"wrapper",ref:c},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:l,onScroll:p},[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:_[0]||(_[0]=g=>t("prev"))})],512),[[e.vShow,h.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(g,C)=>(e.openBlock(),e.createElementBlock("li",{key:C,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":v.value===C}]),ref_for:!0,ref_key:"btn",ref:a,onClick:ue=>v.value=C},[e.createElementVNode("img",{src:g.url,alt:g.name},null,8,D),e.createElementVNode("div",O,e.toDisplayString(g.name),1)],10,R)]))),128)),e.withDirectives(e.createElementVNode("div",P,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:_[1]||(_[1]=g=>t("next"))})],512),[[e.vShow,s.value]])],544)],512))}},A=V._(W,[["__scopeId","data-v-ebb85a22"]]),q={class:"vr-tour-scene"},z=["src"],F={key:1,class:"vr-tour-scene__img"},H=["src","alt"],M={__name:"VrTourScene",props:{scene:{type:Object,default:()=>({})}},setup(k){const w=k,x=e.computed(()=>{var i;return(i=w.scene)==null?void 0:i.embed}),y=e.computed(()=>{var i;return(i=w.scene)==null?void 0:i.url}),B=e.computed(()=>{var i;return(i=w.scene)==null?void 0:i.name});return(i,c)=>(e.openBlock(),e.createElementBlock("div",q,[x.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:x.value,frameborder:"0"},null,8,z)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:y.value,alt:B.value},null,8,H)]))]))}},U=V._(M,[["__scopeId","data-v-c07507d5"]]),Y={class:"vr-tour-select"},G={class:"select-btn__focus-name line-clamp-1"},J={class:"select-list"},K=["onClick"],Q={__name:"VrTourSelect",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(k,{emit:w}){const{proxy:x}=e.getCurrentInstance(),{$_vsWidth:y}=x,B={mounted(s,v){s.clickOutsideEvent=n=>{s===n.target||s.contains(n.target)||v.value(n)},document.body.addEventListener("click",s.clickOutsideEvent)},unmounted(s){document.body.removeEventListener("click",s.clickOutsideEvent)}},i=k,c=w,l=e.ref(!1),a=e.ref(-8),f=e.ref(null),u=e.computed({get(){return i.currentIdx??0},set(s){c("updateIdx",s)}}),m=e.computed(()=>{var s;return((s=i.list[u.value])==null?void 0:s.name)||""});e.watch(l,()=>{b()}),e.onMounted(()=>{window.addEventListener("resize",()=>{y.value=window.innerWidth,l.value&&b()})});const d=()=>{l.value=!1},b=()=>{const s=f.value;if(!s)return;const v=V.$(s).x+s.clientWidth;v>y.value&&(a.value=a.value-v+y.value-4)},h=s=>{u.value=s,d()};return(s,v)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["select-btn",{"is-open":l.value}]),onClick:v[0]||(v[0]=n=>l.value=!l.value)},[e.createElementVNode("div",G,e.toDisplayString(m.value),1),v[1]||(v[1]=e.createElementVNode("div",{class:"select-btn__arrow"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["select-block",{"is-open":l.value}]),style:e.normalizeStyle({"--left":`${a.value}px`}),ref_key:"blockRef",ref:f},[e.createElementVNode("ul",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.list,(n,t)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["select-item line-clamp-1",{"is-active":u.value===t}]),key:t,onClick:r=>h(t)},e.toDisplayString(n.name),11,K))),128))])],6)])),[[B,d]])}},j=V._(Q,[["__scopeId","data-v-536804a2"]]),X={class:"vr-tour__wrapper"},Z={key:0,class:"vr-tour__tabs"},ee={class:"container-content-middle"},te={key:1,class:"vr-tour__selects"},le={class:"container-content"},ne={class:"vr-tour__selects__list"},se={class:"vr-tour__scene"},re={key:2,class:"vr-tour__cats"},oe={class:"pt-2"},ce={key:3,class:"vr-tour__chooses"},ae={__name:"index",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(k,{emit:w}){const{proxy:x}=e.getCurrentInstance(),{$_vsWidth:y,$_vsScrollY:B,$vsScreenAddListener:i,$vsScreenDestroyListener:c}=x,l=w,a=k,f=e.ref(0),u=e.ref(0),m=e.ref(0),d=e.computed(()=>{var n;return((n=a.modelValue)==null?void 0:n.data)??null}),b=e.computed(()=>{var n,t;return(t=(n=d.value)==null?void 0:n[f.value])==null?void 0:t.categoriesList}),h=e.computed(()=>{var n,t;return(t=(n=b.value)==null?void 0:n[u.value])==null?void 0:t.facilitiesList}),s=e.computed(()=>{var n;return(n=h.value)==null?void 0:n[m.value]}),v=()=>{var t;if(a.modelValue&&a.modelValue.data)return;const n={id:((t=a.modelValue)==null?void 0:t.id)||V.r(),type:"VrTour",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{key:"secondary-school",name:"Secondary School",categoriesList:[{key:"facilities",name:"Facilities",facilitiesList:[{key:"ece-learning-communities",name:"ECE Learning Communities",url:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",scene:null,embed:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"},{key:"primary-learning-communities",name:"Primary Learning Communities",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5/tour.html"},{key:"our-libraries",name:"Our Libraries",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries/tour.html"},{key:"our-facilities",name:"Our Facilities",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities2/tour.html"},{key:"honglingjin-park",name:"Honglingjin Park",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park2/tour.html"},{key:"other-public-areas",name:"Other Public Areas",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus/tour.html"}]}]},{key:"secondary-school",name:"Secondary School",categoriesList:[{key:"facilities",name:"Facilities",facilitiesList:[{key:"ece-learning-communities",name:"ECE Learning Communities",url:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",scene:null,embed:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"},{key:"primary-learning-communities",name:"Primary Learning Communities",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/y3-5/tour.html"},{key:"our-libraries",name:"Our Libraries",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/libraries/tour.html"},{key:"our-facilities",name:"Our Facilities",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/facilities2/tour.html"},{key:"honglingjin-park",name:"Honglingjin Park",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/park2/tour.html"},{key:"other-public-areas",name:"Other Public Areas",url:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus.jpg",scene:null,embed:"https://osswebsite.ycyw.com/ycis-bj/res/bj/vt/our-campus/tour.html"}]}]}]};l("update:modelValue",n),f.value=0};return e.watch(f,()=>{u.value=0}),e.watch(u,()=>{m.value=0}),v(),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vr-tour bg-neutral-lightest",{"pb-0":h.value&&h.value.length<=1}])},[e.createElementVNode("div",X,[d.value&&d.value.length>1&&e.unref(y)>=768?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("div",ee,[e.createVNode(L,{list:d.value,onUpdateIdx:t[0]||(t[0]=r=>f.value=r),currentIdx:f.value},null,8,["list","currentIdx"])])])):e.createCommentVNode("",!0),e.unref(y)<768?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",le,[e.createElementVNode("div",ne,[d.value.length>1?(e.openBlock(),e.createBlock(j,{key:0,list:d.value,onUpdateIdx:t[1]||(t[1]=r=>f.value=r),currentIdx:f.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0),b.value.length>1?(e.openBlock(),e.createBlock(j,{key:1,list:b.value,onUpdateIdx:t[2]||(t[2]=r=>u.value=r),currentIdx:u.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])]),h.value.length>1?(e.openBlock(),e.createBlock(E,{key:0,list:h.value,onUpdateIdx:t[3]||(t[3]=r=>m.value=r),currentIdx:m.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",se,[e.createVNode(U,{scene:s.value},null,8,["scene"])]),b.value&&e.unref(y)>=768?(e.openBlock(),e.createElementBlock("div",re,[e.withDirectives(e.createElementVNode("div",oe,null,512),[[e.vShow,b.value.length<=1&&h.value.length>1]]),e.withDirectives(e.createVNode(E,{list:b.value,onUpdateIdx:t[4]||(t[4]=r=>u.value=r),currentIdx:u.value},null,8,["list","currentIdx"]),[[e.vShow,b.value.length>1]])])):e.createCommentVNode("",!0),h.value&&h.value.length>1&&e.unref(y)>=768?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(A,{list:h.value,onUpdateIdx:t[5]||(t[5]=r=>m.value=r),currentIdx:m.value},null,8,["list","currentIdx"])])):e.createCommentVNode("",!0)])],2))}},ie=V._(ae,[["__scopeId","data-v-f386fe24"]]);exports.default=ie;