@shjjs/visual-ui 2.0.6 → 2.0.7

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,8 +1,8 @@
1
- import { defineComponent as $, computed as le, watch as u, createElementBlock as O, unref as B, openBlock as W, normalizeClass as oe, createElementVNode as w, shallowRef as P, ref as h, onMounted as se, onUnmounted as ie } from "vue";
2
- import ne from "@amap/amap-jsapi-loader";
3
- import ce from "axios";
4
- import { nanoid as me } from "nanoid";
5
- import { debounce as x } from "lodash";
1
+ import { defineComponent as P, computed as B, watch as u, createElementBlock as C, openBlock as S, normalizeClass as oe, unref as ie, createElementVNode as L, shallowRef as W, ref as h, onMounted as ne, onUnmounted as ce } from "vue";
2
+ import me from "@amap/amap-jsapi-loader";
3
+ import de from "axios";
4
+ import { nanoid as ue } from "nanoid";
5
+ import { debounce as E } from "lodash";
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  import "../../../Interaction/components/Tabs/index.mjs";
@@ -157,14 +157,17 @@ import "../UnityIframe/index.mjs";
157
157
  import "../UnityWebgl/index.mjs";
158
158
  import "../Vr/index.mjs";
159
159
  import "../Earth/index.mjs";
160
- import { SHJDatasourceV2 as de } from "../../../../commons/plugins/datasource/index.mjs";
160
+ import { SHJDatasourceV2 as ye } from "../../../../commons/plugins/datasource/index.mjs";
161
161
  import { SHJParseEvent as p } from "../../../../commons/plugins/event/index.mjs";
162
- import { upgradeAmap3d as ue } from "./version.mjs";
163
- const ye = {
162
+ import { upgradeAmap3d as pe } from "./version.mjs";
163
+ const ge = { class: "relative w-full h-full" }, fe = {
164
+ ref: "amap3dContainer",
165
+ class: "zerov-amap-container"
166
+ }, ve = {
164
167
  key: 1,
165
- class: "w-full h-full flex flex-col items-center justify-center"
166
- }, pe = $({ name: "ShjAmap3d" }), gr = /* @__PURE__ */ $({
167
- ...pe,
168
+ class: "empty-wrap"
169
+ }, he = P({ name: "ShjAmap3d" }), kr = /* @__PURE__ */ P({
170
+ ...he,
168
171
  props: {
169
172
  option: {},
170
173
  sources: {},
@@ -180,13 +183,23 @@ const ye = {
180
183
  "amap3d-scene-dragend",
181
184
  "amap3d-scene-pulseLinkLayer"
182
185
  ],
183
- setup(m, { expose: J, emit: D }) {
184
- const s = le(() => ue(m.option)), y = D, T = () => {
185
- const o = P(), c = P(), L = h(!1), k = h(), b = h(), z = h(), d = h(), E = (t) => {
186
- I(), window._AMapSecurityConfig = {
187
- securityJsCode: t.basic.securityJsCode
188
- }, ne.load({
189
- key: t.basic.key,
186
+ setup(m, { expose: $, emit: J }) {
187
+ const i = B(() => pe(m.option)), D = B(
188
+ () => {
189
+ var s, n;
190
+ return !!((s = i.value.basic) != null && s.key && ((n = i.value.basic) != null && n.securityJsCode));
191
+ }
192
+ ), y = J, T = () => {
193
+ const s = W(), n = W(), w = h(!1), j = h(), k = h(), b = h(), z = h(), d = h(), A = (t) => {
194
+ var e, a;
195
+ if (!((e = t.basic) != null && e.key) || !((a = t.basic) != null && a.securityJsCode)) {
196
+ w.value = !1, x();
197
+ return;
198
+ }
199
+ x(), window._AMapSecurityConfig = {
200
+ securityJsCode: t.basic.securityJsCode || ""
201
+ }, me.load({
202
+ key: t.basic.key || "",
190
203
  // 申请好的Web端开发者Key,首次调用 load 时必填
191
204
  version: "2.0",
192
205
  // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
@@ -202,9 +215,9 @@ const ye = {
202
215
  "AMap.ImageLayer",
203
216
  "AMap.TileLayer"
204
217
  ]
205
- }).then((e) => {
206
- d.value = e;
207
- const a = new d.value.createDefaultLayer({
218
+ }).then((r) => {
219
+ d.value = r;
220
+ const l = new d.value.createDefaultLayer({
208
221
  visible: !0,
209
222
  // 是否可见
210
223
  opacity: 1,
@@ -212,7 +225,7 @@ const ye = {
212
225
  zIndex: 0
213
226
  // 叠加层级
214
227
  });
215
- o.value = new e.Map("zerov-amap-3d", {
228
+ s.value = new r.Map(j.value, {
216
229
  rotateEnable: t.config.rotateEnable,
217
230
  // 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
218
231
  pitchEnable: t.config.pitchEnable,
@@ -237,119 +250,119 @@ const ye = {
237
250
  wallColor: t.config.floors.wallColor,
238
251
  roofColor: t.config.floors.roofColor,
239
252
  skyColor: t.config.skyColor,
240
- layers: [a]
241
- }), c.value = new window.Loca.Container({
242
- map: o.value
253
+ layers: [l]
254
+ }), n.value = new window.Loca.Container({
255
+ map: s.value
243
256
  }), z.value = new d.value.Scale({
244
257
  visible: t.config.plugin.scale.visible,
245
258
  position: {
246
259
  left: t.config.plugin.scale.position.left + "px",
247
260
  bottom: t.config.plugin.scale.position.bottom + "px"
248
261
  }
249
- }), o.value.addControl(z.value), k.value = new e.ControlBar({
262
+ }), s.value.addControl(z.value), k.value = new r.ControlBar({
250
263
  visible: t.config.plugin.controlBar.visible,
251
264
  showControlButton: t.config.plugin.controlBar.showControlButton,
252
265
  position: {
253
266
  right: t.config.plugin.controlBar.position.right + "px",
254
267
  top: t.config.plugin.controlBar.position.top + "px"
255
268
  }
256
- }), o.value.addControl(k.value), b.value = new e.ToolBar({
269
+ }), s.value.addControl(k.value), b.value = new r.ToolBar({
257
270
  visible: t.config.plugin.toolBar.visible,
258
271
  position: {
259
272
  left: t.config.plugin.toolBar.position.left + "px",
260
273
  top: t.config.plugin.toolBar.position.top + "px"
261
274
  }
262
- }), o.value.addControl(b.value), M(e), o.value.on("complete", () => {
275
+ }), s.value.addControl(b.value), I(r), s.value.on("complete", () => {
263
276
  setTimeout(() => {
264
- L.value = !0, y("amap3d-scene-success"), p.parseEvents(m.useEvents, "amap3d-scene-success", null);
277
+ w.value = !0, y("amap3d-scene-success"), p.parseEvents(m.useEvents, "amap3d-scene-success", null);
265
278
  }, 666);
266
- }), o.value.on("zoomstart", () => {
279
+ }), s.value.on("zoomstart", () => {
267
280
  y("amap3d-scene-zoomstart"), p.parseEvents(m.useEvents, "amap3d-scene-zoomstart", null);
268
- }), o.value.on("zoomend", () => {
281
+ }), s.value.on("zoomend", () => {
269
282
  y("amap3d-scene-zoomend"), p.parseEvents(m.useEvents, "amap3d-scene-zoomend", null);
270
- }), o.value.on("click", (r) => {
271
- y("amap3d-scene-mapclick", r.lnglat), p.parseEvents(
283
+ }), s.value.on("click", (o) => {
284
+ y("amap3d-scene-mapclick", o.lnglat), p.parseEvents(
272
285
  m.useEvents,
273
286
  "amap3d-scene-mapclick",
274
- r.lnglat
287
+ o.lnglat
275
288
  );
276
- }), o.value.on("dragstart", (r) => {
277
- y("amap3d-scene-dragstart", r.lnglat), p.parseEvents(
289
+ }), s.value.on("dragstart", (o) => {
290
+ y("amap3d-scene-dragstart", o.lnglat), p.parseEvents(
278
291
  m.useEvents,
279
292
  "amap3d-scene-dragstart",
280
- r.lnglat
293
+ o.lnglat
281
294
  );
282
- }), o.value.on("dragend", (r) => {
283
- y("amap3d-scene-dragend", r.lnglat), p.parseEvents(
295
+ }), s.value.on("dragend", (o) => {
296
+ y("amap3d-scene-dragend", o.lnglat), p.parseEvents(
284
297
  m.useEvents,
285
298
  "amap3d-scene-dragend",
286
- r.lnglat
299
+ o.lnglat
287
300
  );
288
301
  });
289
- }).catch((e) => {
302
+ }).catch((r) => {
290
303
  });
291
- }, M = x((t) => {
292
- m.sources && m.sources.length > 0 ? s.value.widgets.forEach((a, r) => {
293
- de.parse({
304
+ }, I = E((t) => {
305
+ m.sources && m.sources.length > 0 ? i.value.widgets.forEach((a, r) => {
306
+ ye.parse({
294
307
  sources: [m.sources[r]],
295
308
  callback: (l) => {
296
309
  try {
297
- a && a.type === "heatmap" && V(
310
+ a && a.type === "heatmap" && U(
298
311
  window.Loca,
299
312
  a,
300
313
  f(l.data[0].data, "Point")
301
- ), a && a.type === "dotlayers" && U(
314
+ ), a && a.type === "dotlayers" && q(
302
315
  window.Loca,
303
316
  a,
304
317
  f(l.data[0].data, "Point")
305
- ), a && a.type === "scatter" && q(
318
+ ), a && a.type === "scatter" && Q(
306
319
  window.Loca,
307
320
  a,
308
321
  f(l.data[0].data, "Point")
309
- ), a && a.type === "labelsLayer" && K(
322
+ ), a && a.type === "labelsLayer" && X(
310
323
  window.Loca,
311
324
  a,
312
325
  f(l.data[0].data, "Point")
313
- ), a && a.type === "signagePoints" && Q(
326
+ ), a && a.type === "signagePoints" && Y(
314
327
  window.Loca,
315
328
  a,
316
329
  f(l.data[0].data, "Point")
317
- ), a && a.type === "pulseLinkLayer" && X(
330
+ ), a && a.type === "pulseLinkLayer" && _(
318
331
  window.Loca,
319
332
  a,
320
333
  f(l.data[0].data, "LineString")
321
334
  );
322
335
  } catch {
323
336
  }
324
- s.value.widgets.filter((i) => i.type === "boundary").forEach((i) => {
325
- A(t, i);
337
+ i.value.widgets.filter((o) => o.type === "boundary").forEach((o) => {
338
+ O(t, o);
326
339
  });
327
340
  }
328
341
  });
329
- }) : s.value.widgets.filter((a) => a.type === "boundary").forEach((a) => {
330
- A(t, a);
342
+ }) : i.value.widgets.filter((a) => a.type === "boundary").forEach((a) => {
343
+ O(t, a);
331
344
  });
332
- const e = o.value.getLayers();
345
+ const e = s.value.getLayers();
333
346
  for (let a = 0; a < e.length; a++)
334
- (e[a].type === "sketchTileLayer" || e[a]._opts.type === "sketchImageLayer") && o.value.removeLayer(e[a]);
335
- s.value.widgets.filter((a) => a.type === "sketchTile").forEach((a) => {
336
- const r = j(a);
337
- r && o.value.addLayer(r);
338
- }), s.value.widgets.filter((a) => a.type === "sketchImage").forEach((a) => {
339
- const r = R(a);
340
- o.value.addLayer(r);
347
+ (e[a].type === "sketchTileLayer" || e[a]._opts.type === "sketchImageLayer") && s.value.removeLayer(e[a]);
348
+ i.value.widgets.filter((a) => a.type === "sketchTile").forEach((a) => {
349
+ const r = V(a);
350
+ r && s.value.addLayer(r);
351
+ }), i.value.widgets.filter((a) => a.type === "sketchImage").forEach((a) => {
352
+ const r = K(a);
353
+ s.value.addLayer(r);
341
354
  });
342
- }, 200), Z = (t) => {
355
+ }, 200), R = (t) => {
343
356
  const a = t.slice(
344
357
  t.indexOf("(") + 1,
345
358
  t.lastIndexOf(")")
346
359
  ).split(",").map((l) => l.trim()), r = {};
347
360
  for (let l = 1; l < a.length; l++) {
348
- const i = a[l].split(" "), n = i[0], v = parseFloat(i[1]) / 100, re = Math.round(v * 100) / 100;
349
- r[re] = n;
361
+ const o = a[l].split(" "), c = o[0], v = parseFloat(o[1]) / 100, se = Math.round(v * 100) / 100;
362
+ r[se] = c;
350
363
  }
351
364
  return r;
352
- }, j = (t) => {
365
+ }, V = (t) => {
353
366
  try {
354
367
  return new d.value.TileLayer({
355
368
  bounds: new d.value.Bounds(
@@ -371,7 +384,7 @@ const ye = {
371
384
  } catch {
372
385
  }
373
386
  return null;
374
- }, R = (t) => {
387
+ }, K = (t) => {
375
388
  try {
376
389
  return new d.value.ImageLayer({
377
390
  bounds: new d.value.Bounds(
@@ -390,7 +403,7 @@ const ye = {
390
403
  } catch {
391
404
  }
392
405
  return null;
393
- }, V = (t, e, a) => {
406
+ }, U = (t, e, a) => {
394
407
  try {
395
408
  const r = new t.HeatMapLayer({
396
409
  zIndex: 10,
@@ -405,26 +418,26 @@ const ye = {
405
418
  unit: e.style.unit,
406
419
  height: e.style.height,
407
420
  opacity: e.style.opacity,
408
- gradient: Z(e.style.gradient),
409
- value: function(i, n) {
410
- return n.coordinates[2] || 0;
421
+ gradient: R(e.style.gradient),
422
+ value: function(o, c) {
423
+ return c.coordinates[2] || 0;
411
424
  },
412
425
  min: e.style.min,
413
426
  max: e.style.max,
414
427
  // 4.6
415
428
  heightBezier: [0, 0.53, 0.37, 0.98]
416
- }), c.value.add(r);
429
+ }), n.value.add(r);
417
430
  } catch {
418
431
  }
419
- }, A = async (t, e) => {
432
+ }, O = async (t, e) => {
420
433
  try {
421
- const a = await ce.get(e.geojson);
434
+ const a = await de.get(e.geojson);
422
435
  if (a.status === 200) {
423
436
  const r = new t.GeoJSON({
424
437
  geoJSON: a.data,
425
- getPolygon: function(l, i) {
426
- const n = new t.Polygon({
427
- path: i,
438
+ getPolygon: function(l, o) {
439
+ const c = new t.Polygon({
440
+ path: o,
428
441
  zIndex: e.zIndex,
429
442
  fillColor: e.style.fillColor,
430
443
  // 填充色
@@ -439,8 +452,8 @@ const ye = {
439
452
  strokeStyle: e.style.strokeStyle
440
453
  // 线条样式
441
454
  });
442
- return n.on("mouseover", () => {
443
- n.setOptions({
455
+ return c.on("mouseover", () => {
456
+ c.setOptions({
444
457
  fillOpacity: e.mouseover.fillOpacity,
445
458
  fillColor: e.mouseover.fillColor,
446
459
  strokeOpacity: e.mouseover.strokeOpacity,
@@ -448,8 +461,8 @@ const ye = {
448
461
  strokeStyle: e.mouseover.strokeStyle,
449
462
  strokeWeight: e.mouseover.strokeWeight
450
463
  });
451
- }), n.on("mouseout", () => {
452
- n.setOptions({
464
+ }), c.on("mouseout", () => {
465
+ c.setOptions({
453
466
  fillColor: e.style.fillColor,
454
467
  // 填充色
455
468
  strokeOpacity: e.style.strokeOpacity,
@@ -463,14 +476,14 @@ const ye = {
463
476
  strokeStyle: e.style.strokeStyle
464
477
  // 线条样式
465
478
  });
466
- }), n;
479
+ }), c;
467
480
  }
468
481
  });
469
- o.value.add(r);
482
+ s.value.add(r);
470
483
  }
471
484
  } catch {
472
485
  }
473
- }, U = (t, e, a) => {
486
+ }, q = (t, e, a) => {
474
487
  try {
475
488
  const r = new t.GeoJSONSource({
476
489
  data: a
@@ -479,7 +492,7 @@ const ye = {
479
492
  blend: e.blend,
480
493
  visible: e.visible,
481
494
  opacity: e.opacity
482
- }), i = {
495
+ }), o = {
483
496
  radius: e.style.radius,
484
497
  unit: e.style.unit,
485
498
  color: e.style.color,
@@ -487,7 +500,7 @@ const ye = {
487
500
  blurWidth: e.style.blurWidth,
488
501
  borderColor: e.style.borderColor
489
502
  };
490
- l.setSource(r), l.setStyle(i), c.value.add(l), l.addAnimate({
503
+ l.setSource(r), l.setStyle(o), n.value.add(l), l.addAnimate({
491
504
  key: e.animate.key,
492
505
  value: e.animate.value,
493
506
  duration: e.animate.duration,
@@ -500,12 +513,12 @@ const ye = {
500
513
  });
501
514
  } catch {
502
515
  }
503
- }, q = (t, e, a) => {
516
+ }, Q = (t, e, a) => {
504
517
  try {
505
518
  const r = new t.GeoJSONSource({
506
519
  data: a
507
520
  }), l = new t.ScatterLayer({
508
- loca: c.value,
521
+ loca: n.value,
509
522
  zIndex: e.zIndex,
510
523
  opacity: e.opacity,
511
524
  visible: e.visible,
@@ -518,10 +531,10 @@ const ye = {
518
531
  texture: e.style.texture,
519
532
  duration: e.style.duration,
520
533
  animate: e.style.animate
521
- }), c.value.animate.start();
534
+ }), n.value.animate.start();
522
535
  } catch {
523
536
  }
524
- }, K = (t, e, a) => {
537
+ }, X = (t, e, a) => {
525
538
  try {
526
539
  const r = new t.GeoJSONSource({
527
540
  data: a
@@ -544,7 +557,7 @@ const ye = {
544
557
  },
545
558
  text: {
546
559
  // 每项配置都可使用回调函数来动态配置
547
- content: (i, n) => n.properties[e.text.content],
560
+ content: (o, c) => c.properties[e.text.content],
548
561
  zooms: e.text.zooms,
549
562
  offset: e.text.offset,
550
563
  direction: e.text.direction,
@@ -562,16 +575,16 @@ const ye = {
562
575
  }
563
576
  }
564
577
  }), l.on("complete", () => {
565
- const i = l.getLabelsLayer().getAllOverlays();
566
- for (const n of i)
567
- n.on("click", (v) => {
568
- }), n.on("mouseover", (v) => {
569
- }), n.on("mouseout", (v) => {
578
+ const o = l.getLabelsLayer().getAllOverlays();
579
+ for (const c of o)
580
+ c.on("click", (v) => {
581
+ }), c.on("mouseover", (v) => {
582
+ }), c.on("mouseout", (v) => {
570
583
  });
571
- }), c.value.add(l);
584
+ }), n.value.add(l);
572
585
  } catch {
573
586
  }
574
- }, Q = (t, e, a) => {
587
+ }, Y = (t, e, a) => {
575
588
  try {
576
589
  const r = new t.GeoJSONSource({
577
590
  data: a
@@ -583,7 +596,7 @@ const ye = {
583
596
  depth: !1
584
597
  });
585
598
  l.setSource(r), l.setStyle({
586
- content: (n, v) => `<div style="
599
+ content: (c, v) => `<div style="
587
600
  width: ${e.signs.style.width}px;
588
601
  height: ${e.signs.style.height + 148}px;
589
602
  ">
@@ -607,15 +620,15 @@ const ye = {
607
620
  alwaysFront: e.signs.style.alwaysFront,
608
621
  size: [e.signs.style.width, e.signs.style.height + 148],
609
622
  altitude: e.signs.style.altitude
610
- }), c.value.add(l);
611
- const i = new t.ZMarkerLayer({
623
+ }), n.value.add(l);
624
+ const o = new t.ZMarkerLayer({
612
625
  zIndex: e.landmark.zIndex,
613
626
  visible: e.landmark.visible,
614
627
  zooms: e.landmark.zooms,
615
628
  opacity: e.landmark.opacity,
616
629
  depth: !1
617
630
  });
618
- i.setSource(r), i.setStyle({
631
+ o.setSource(r), o.setStyle({
619
632
  content: () => `<div style="
620
633
  width: ${e.landmark.style.size[0]}px;
621
634
  height: ${e.landmark.style.size[1]}px;
@@ -628,7 +641,7 @@ const ye = {
628
641
  alwaysFront: e.landmark.style.alwaysFront,
629
642
  size: e.landmark.style.size,
630
643
  altitude: e.landmark.style.altitude
631
- }), i.addAnimate({
644
+ }), o.addAnimate({
632
645
  key: "altitude",
633
646
  value: [0, 1],
634
647
  random: e.landmark.animate.random,
@@ -637,10 +650,10 @@ const ye = {
637
650
  delay: e.landmark.animate.delay,
638
651
  yoyo: e.landmark.animate.yoyo,
639
652
  repeat: e.landmark.animate.repeat
640
- }), c.value.add(i), c.value.animate.start();
653
+ }), n.value.add(o), n.value.animate.start();
641
654
  } catch {
642
655
  }
643
- }, X = (t, e, a) => {
656
+ }, _ = (t, e, a) => {
644
657
  const r = new t.PulseLinkLayer({
645
658
  zIndex: e.zIndex,
646
659
  opacity: e.opacity,
@@ -654,8 +667,8 @@ const ye = {
654
667
  unit: e.style.unit,
655
668
  dash: [4e4, 0, 4e4, 0],
656
669
  lineWidth: e.style.lineWidth,
657
- height: function(i, n) {
658
- return n.distance / 3 + e.style.height;
670
+ height: function(o, c) {
671
+ return c.distance / 3 + e.style.height;
659
672
  },
660
673
  // altitude: 1000,
661
674
  smoothSteps: 30,
@@ -668,14 +681,14 @@ const ye = {
668
681
  // 弧顶位置比例
669
682
  headColor: e.style.headColor,
670
683
  trailColor: e.style.trailColor
671
- }), o.value.on("click", (i) => {
672
- const n = r.queryFeature(i.pixel.toArray());
673
- n && (y("amap3d-scene-pulseLinkLayer", n), p.parseEvents(
684
+ }), s.value.on("click", (o) => {
685
+ const c = r.queryFeature(o.pixel.toArray());
686
+ c && (y("amap3d-scene-pulseLinkLayer", c), p.parseEvents(
674
687
  m.useEvents,
675
688
  "amap3d-scene-pulseLinkLayer",
676
- n
689
+ c
677
690
  ));
678
- }), c.value.add(r), c.value.animate.start();
691
+ }), n.value.add(r), n.value.animate.start();
679
692
  }, f = (t, e) => {
680
693
  const a = {
681
694
  type: "FeatureCollection",
@@ -684,7 +697,7 @@ const ye = {
684
697
  return t.forEach((r) => {
685
698
  const l = {
686
699
  type: "Feature",
687
- id: me(),
700
+ id: ue(),
688
701
  properties: {
689
702
  type: e === "Point" ? e : 0,
690
703
  ...r
@@ -696,123 +709,122 @@ const ye = {
696
709
  };
697
710
  a.features.push(l);
698
711
  }), a;
699
- }, Y = (t) => {
700
- o.value.setFeatures(t.config.features), o.value.setPitch(t.config.pitch), o.value.setRotation(t.config.rotation), o.value.setStatus({
712
+ }, ee = (t) => {
713
+ s.value && (s.value.setFeatures(t.config.features), s.value.setPitch(t.config.pitch), s.value.setRotation(t.config.rotation), s.value.setStatus({
701
714
  dragEnable: t.config.dragEnable,
702
715
  zoomEnable: t.config.zoomEnable,
703
716
  rotateEnable: t.config.rotateEnable,
704
717
  pitchEnable: t.config.pitchEnable
705
- }), t.config.plugin.scale.visible ? z.value.show() : z.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? k.value.show() : k.value.hide();
706
- }, _ = () => {
707
- o.value && (o.value.clearMap(), c.value.clear(), M(d.value));
708
- }, ee = (t) => {
709
- o.value.setMapStyle(t.config.mapStyle);
710
- }, te = (t) => {
711
- o.value.setZoom(t.config.zoom, !1, 200);
718
+ }), t.config.plugin.scale.visible ? z.value.show() : z.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? k.value.show() : k.value.hide());
719
+ }, te = () => {
720
+ s.value && (s.value.clearMap(), n.value.clear(), I(d.value));
712
721
  }, ae = (t) => {
713
- o.value.setCenter(t.config.center, !1, 200);
714
- }, I = () => {
715
- o.value && (o.value.clearMap(), o.value.destroy(), o.value = null, c.value && (c.value.clear(), c.value.destroy(), c.value = null));
722
+ s.value && s.value.setMapStyle(t.config.mapStyle);
723
+ }, re = (t) => {
724
+ s.value && s.value.setZoom(t.config.zoom, !1, 200);
725
+ }, le = (t) => {
726
+ s.value && s.value.setCenter(t.config.center, !1, 200);
727
+ }, x = () => {
728
+ s.value && (s.value.clearMap(), s.value.destroy(), s.value = null, n.value && (n.value.clear(), n.value.destroy(), n.value = null));
716
729
  };
717
- return se(() => {
730
+ return ne(() => {
718
731
  setTimeout(() => {
719
- E(s.value);
732
+ A(i.value);
720
733
  }, 0);
721
- }), ie(() => I()), {
722
- initAMap3d: E,
723
- updateAMapStyle: ee,
724
- updateAMapConfig: Y,
725
- updateAMapComponents: _,
726
- updateAMapZoom: te,
727
- updateAMapCenter: ae,
728
- amap3d: o,
729
- loading: L,
734
+ }), ce(() => x()), {
735
+ initAMap3d: A,
736
+ updateAMapStyle: ae,
737
+ updateAMapConfig: ee,
738
+ updateAMapComponents: te,
739
+ updateAMapZoom: re,
740
+ updateAMapCenter: le,
741
+ amap3d: s,
742
+ loading: w,
730
743
  AMapPrototype: d
731
744
  };
732
745
  }, {
733
746
  initAMap3d: g,
734
747
  updateAMapStyle: F,
735
- updateAMapConfig: C,
748
+ updateAMapConfig: M,
736
749
  updateAMapComponents: N,
737
750
  updateAMapZoom: G,
738
751
  updateAMapCenter: H,
739
- loading: S
752
+ loading: Z
740
753
  } = T();
741
754
  return u(
742
- () => s.value.config,
755
+ () => i.value.config,
743
756
  () => {
744
- C(s.value);
757
+ M(i.value);
745
758
  },
746
759
  { deep: !0 }
747
760
  ), u(
748
- () => s.value.config.zoom,
761
+ () => i.value.config.zoom,
749
762
  () => {
750
- G(s.value);
763
+ G(i.value);
751
764
  },
752
765
  { deep: !0 }
753
766
  ), u(
754
- () => s.value.config.center,
767
+ () => i.value.config.center,
755
768
  () => {
756
- H(s.value);
769
+ H(i.value);
757
770
  },
758
771
  { deep: !0 }
759
772
  ), u(
760
- () => s.value.config.floors,
761
- x(() => {
762
- g(s.value);
773
+ () => i.value.config.floors,
774
+ E(() => {
775
+ g(i.value);
763
776
  }, 300),
764
777
  { deep: !0 }
765
778
  ), u(
766
- () => s.value.config.skyColor,
767
- x(() => {
768
- g(s.value);
779
+ () => i.value.config.skyColor,
780
+ E(() => {
781
+ g(i.value);
769
782
  }, 300),
770
783
  { deep: !0 }
771
784
  ), u(
772
- () => s.value.widgets,
785
+ () => i.value.widgets,
773
786
  () => {
774
787
  N();
775
788
  },
776
789
  { deep: !0 }
777
790
  ), u(
778
- () => s.value.config.mapStyle,
791
+ () => i.value.config.mapStyle,
779
792
  () => {
780
- F(s.value);
793
+ F(i.value);
781
794
  },
782
795
  { deep: !0 }
783
796
  ), u(
784
- () => s.value.basic,
797
+ () => i.value.basic,
785
798
  () => {
786
- g(s.value);
799
+ g(i.value);
787
800
  },
788
801
  { deep: !0 }
789
802
  ), u(
790
803
  () => m.sources,
791
804
  () => {
792
- g(s.value);
805
+ g(i.value);
793
806
  },
794
807
  { deep: !0 }
795
- ), J({
796
- refresh: () => g(s.value),
797
- refreshView: () => C(s.value),
798
- refreshData: () => g(s.value)
799
- }), (o, c) => B(S) ? (W(), O("div", {
800
- key: 0,
801
- class: oe(["amap-3d-wrap", { show: B(S) }])
802
- }, c[0] || (c[0] = [
803
- w("div", {
804
- id: "zerov-amap-3d",
805
- class: "zerov-amap-container"
806
- }, null, -1)
807
- ]), 2)) : (W(), O("div", ye, c[1] || (c[1] = [
808
- w("i", {
809
- class: "iconfont shj-gaodeditu",
810
- style: { "font-size": "48px" }
811
- }, null, -1),
812
- w("p", { class: "text-gray-500" }, " 缺少必要的Key和密钥,请先在右侧配置面板中进行配置 ", -1)
813
- ])));
808
+ ), $({
809
+ refresh: () => g(i.value),
810
+ refreshView: () => M(i.value),
811
+ refreshData: () => g(i.value)
812
+ }), (s, n) => (S(), C("div", ge, [
813
+ D.value ? (S(), C("div", {
814
+ key: 0,
815
+ class: oe(["amap-3d-wrap", { show: ie(Z) }])
816
+ }, [
817
+ L("div", fe, null, 512)
818
+ ], 2)) : (S(), C("div", ve, n[0] || (n[0] = [
819
+ L("i", {
820
+ class: "iconfont shj-gaodeditu",
821
+ style: { "font-size": "48px" }
822
+ }, null, -1),
823
+ L("p", { class: "text-gray-500" }, " 缺少必要的Key和密钥,请先在右侧配置面板中进行配置 ", -1)
824
+ ])))
825
+ ]));
814
826
  }
815
827
  });
816
828
  export {
817
- gr as default
829
+ kr as default
818
830
  };