@das-fed/ui 6.4.0-dev.55.22 → 6.4.0-dev.55.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/package.json +5 -5
- package/packages/business-components/device-panel/index.js +28 -28
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/import-button/index.js +1 -1
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/process-configuration/i18n/index.d.ts +5 -0
- package/packages/business-components/process-configuration/index.js +2 -1
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-configuration/src/hooks/useDeleteDialog.d.ts +2 -3
- package/packages/components/autocomplete/index.d.ts +13 -4
- package/packages/components/autocomplete/index.js +158 -139
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/src/index.vue.d.ts +2 -1
- package/packages/components/autocomplete/src/type.d.ts +4 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/edit-table/index.d.ts +9 -9
- package/packages/components/edit-table/index.js +2004 -1640
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/hooks/use-validator.d.ts +8 -3
- package/packages/components/edit-table/src/index.vue.d.ts +1 -1
- package/packages/components/edit-table/src/type.d.ts +13 -0
- package/packages/components/edit-table/src/utils.d.ts +11 -5
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/input/index.js +42 -41
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/map/index.js +164 -162
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/select/index.js +199 -199
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tree/index.js +1 -1
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +379 -345
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +2 -1
- package/packages/components/tree-select/src/type.d.ts +3 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
|
@@ -13,7 +13,7 @@ import { DasButton as la } from "@das-fed/ui/packages/components/button/index";
|
|
|
13
13
|
const Q = (e) => {
|
|
14
14
|
if (e)
|
|
15
15
|
return typeof e == "string" && hasCssUnit(e) ? e : e + "px";
|
|
16
|
-
}, st = ({ MapGL: e, map: t, marker: a, mapLoading:
|
|
16
|
+
}, st = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
17
17
|
const C = S();
|
|
18
18
|
let M;
|
|
19
19
|
const k = (T, g, p, w) => {
|
|
@@ -38,7 +38,7 @@ const Q = (e) => {
|
|
|
38
38
|
...p
|
|
39
39
|
});
|
|
40
40
|
} catch {
|
|
41
|
-
|
|
41
|
+
r.value = !1, z.error(E("thirdPartyMapErrorRetry"));
|
|
42
42
|
}
|
|
43
43
|
AMap.plugin(["AMap.ToolBar"], () => {
|
|
44
44
|
t.value.addControl(
|
|
@@ -48,32 +48,32 @@ const Q = (e) => {
|
|
|
48
48
|
liteStyle: !0
|
|
49
49
|
})
|
|
50
50
|
);
|
|
51
|
-
}), i(), (g = C.value) != null && g.clickStream || c(),
|
|
51
|
+
}), i(), (g = C.value) != null && g.clickStream || c(), r.value = !1, M && M();
|
|
52
52
|
}
|
|
53
53
|
}, c = () => {
|
|
54
54
|
t.value.on("click", (T) => {
|
|
55
55
|
a.value && t.value.remove(a.value), o.value = [T.lnglat.getLng(), T.lnglat.getLat()], h(o.value, !0).then(() => {
|
|
56
56
|
a.value = new AMap.Marker({
|
|
57
57
|
position: o.value,
|
|
58
|
-
title:
|
|
58
|
+
title: n.value
|
|
59
59
|
}), t.value.add(a.value), t.value.setCenter(o.value);
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
}, i = async () => {
|
|
63
|
-
!
|
|
63
|
+
!n.value && !o.value.length && R(), n.value && o.value.length > 0 ? await h(o.value) : n.value ? await A(n.value) : o.value.length > 0 && await h(o.value, !0), n.value && _(n.value, (T, g) => {
|
|
64
64
|
if (g && g.length) {
|
|
65
65
|
const p = g.find(
|
|
66
|
-
(w) => w.value ===
|
|
66
|
+
(w) => w.value === n.value || w.info.name === n.value
|
|
67
67
|
);
|
|
68
68
|
p ? v.value = p.info : v.value = {
|
|
69
69
|
district: "",
|
|
70
70
|
address: "",
|
|
71
|
-
name:
|
|
71
|
+
name: n.value
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}), a.value = new AMap.Marker({
|
|
75
75
|
position: o.value,
|
|
76
|
-
title:
|
|
76
|
+
title: n.value
|
|
77
77
|
}), t.value.add(a.value), o.value.length && t.value.setCenter(o.value);
|
|
78
78
|
}, h = (T, g = !1) => {
|
|
79
79
|
const p = T.join(",");
|
|
@@ -86,10 +86,10 @@ const Q = (e) => {
|
|
|
86
86
|
if (f === "complete" && (y != null && y.regeocode)) {
|
|
87
87
|
if (g) {
|
|
88
88
|
const { province: O = "", city: N = "", district: B = "", township: ne = "" } = y.regeocode.addressComponent;
|
|
89
|
-
|
|
89
|
+
n.value = y.regeocode.formattedAddress ?? "", v.value = {
|
|
90
90
|
district: O + N + B,
|
|
91
91
|
address: ne,
|
|
92
|
-
name:
|
|
92
|
+
name: n.value.replace(O, "").replace(N, "").replace(B, "").replace(ne, "")
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
s.value = ((m = (x = y.regeocode) == null ? void 0 : x.addressComponent) == null ? void 0 : m.adcode) ?? "", w(y.regeocode);
|
|
@@ -152,10 +152,10 @@ const Q = (e) => {
|
|
|
152
152
|
return {
|
|
153
153
|
getLocationByInputSearch: _,
|
|
154
154
|
handleSelectAddress: (T) => {
|
|
155
|
-
|
|
155
|
+
n.value = T.value, v.value = T.info, A(T.value).then((g) => {
|
|
156
156
|
o.value = [g.lng, g.lat], a.value && t.value.remove(a.value), a.value = new AMap.Marker({
|
|
157
157
|
position: o.value,
|
|
158
|
-
title:
|
|
158
|
+
title: n.value
|
|
159
159
|
// 鼠标移上去时显示的内容
|
|
160
160
|
}), t.value.add(a.value), t.value.setCenter(o.value);
|
|
161
161
|
});
|
|
@@ -163,11 +163,11 @@ const Q = (e) => {
|
|
|
163
163
|
getLocationParse: async () => {
|
|
164
164
|
var T;
|
|
165
165
|
if (!l.value.length) return z.error(E("thirdPartyMapErrorRetry"));
|
|
166
|
-
if (
|
|
166
|
+
if (n.value = l.value[0].value, !((T = l.value[0]) != null && T.point))
|
|
167
167
|
return z.error(E("thirdPartyMapErrorRetry"));
|
|
168
168
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, await h(o.value), a.value = new AMap.Marker({
|
|
169
169
|
position: o.value,
|
|
170
|
-
title:
|
|
170
|
+
title: n.value
|
|
171
171
|
// 鼠标移上去时显示的内容
|
|
172
172
|
}), t.value.add(a.value), t.value.setCenter(o.value), u.value.activated = !1;
|
|
173
173
|
},
|
|
@@ -175,24 +175,24 @@ const Q = (e) => {
|
|
|
175
175
|
longitude: o.value[0],
|
|
176
176
|
latitude: o.value[1],
|
|
177
177
|
adCode: s.value,
|
|
178
|
-
address:
|
|
178
|
+
address: n.value,
|
|
179
179
|
addressInfo: v.value
|
|
180
180
|
}),
|
|
181
181
|
loadJavascript: k
|
|
182
182
|
};
|
|
183
183
|
}, dt = "v1", ua = ct(`/api/tool/map/${dt}`), ia = ct(`/api/system-config/${dt}`), ca = ua.get("/regeo"), sa = ia.get("/platform/map/list"), Ge = async (e) => {
|
|
184
|
-
var
|
|
184
|
+
var n, o, s, v, b;
|
|
185
185
|
const t = ["", "baidu", "gaode", "google"];
|
|
186
|
-
let a = null, [
|
|
187
|
-
if (
|
|
188
|
-
return [
|
|
186
|
+
let a = null, [r, u] = await sa().run();
|
|
187
|
+
if (r)
|
|
188
|
+
return [r, a];
|
|
189
189
|
const l = u.filter((C) => C.enable) || [];
|
|
190
190
|
if ((l == null ? void 0 : l.length) == 0) return [null, a];
|
|
191
191
|
if ((l == null ? void 0 : l.length) > 1) {
|
|
192
192
|
const C = l.filter((M) => t[M.serviceProvider] == e);
|
|
193
193
|
a = {
|
|
194
194
|
mapType: e,
|
|
195
|
-
akVal: (
|
|
195
|
+
akVal: (n = C[0]) == null ? void 0 : n.akValue,
|
|
196
196
|
secretK: (o = C[0]) == null ? void 0 : o.securityKey
|
|
197
197
|
};
|
|
198
198
|
} else (l == null ? void 0 : l.length) == 1 && (a = {
|
|
@@ -214,15 +214,15 @@ const Q = (e) => {
|
|
|
214
214
|
dev: { type: Boolean }
|
|
215
215
|
},
|
|
216
216
|
setup(e, { expose: t }) {
|
|
217
|
-
const a = e,
|
|
217
|
+
const a = e, r = I(null), u = I(null), l = I(null), n = S(!0), o = S(null), s = S([]), v = Se(() => ({
|
|
218
218
|
width: a.width ? Q(a.width) : "100%",
|
|
219
219
|
height: a.height ? Q(a.height) : "100%"
|
|
220
220
|
})), b = S(""), C = S([]), M = S(""), k = S(), { getLocationByInputSearch: L, handleSelectAddress: c, getLocationParse: i, getMapInfo: h, loadJavascript: A } = st(
|
|
221
221
|
{
|
|
222
|
-
MapGL:
|
|
222
|
+
MapGL: r,
|
|
223
223
|
map: u,
|
|
224
224
|
marker: l,
|
|
225
|
-
mapLoading:
|
|
225
|
+
mapLoading: n,
|
|
226
226
|
$autocomplete: o,
|
|
227
227
|
searchResultList: s,
|
|
228
228
|
innerInput: b,
|
|
@@ -284,7 +284,7 @@ const Q = (e) => {
|
|
|
284
284
|
), [
|
|
285
285
|
[
|
|
286
286
|
U,
|
|
287
|
-
|
|
287
|
+
n.value,
|
|
288
288
|
void 0,
|
|
289
289
|
{ lock: !0 }
|
|
290
290
|
]
|
|
@@ -297,10 +297,10 @@ const Q = (e) => {
|
|
|
297
297
|
}
|
|
298
298
|
}), Be = (e, t) => {
|
|
299
299
|
const a = e.__vccOpts || e;
|
|
300
|
-
for (const [
|
|
301
|
-
a[
|
|
300
|
+
for (const [r, u] of t)
|
|
301
|
+
a[r] = u;
|
|
302
302
|
return a;
|
|
303
|
-
}, ga = /* @__PURE__ */ Be(va, [["__scopeId", "data-v-e88a8400"]]), ft = ({ BMap: e, map: t, marker: a, mapLoading:
|
|
303
|
+
}, ga = /* @__PURE__ */ Be(va, [["__scopeId", "data-v-e88a8400"]]), ft = ({ BMap: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
304
304
|
const C = S();
|
|
305
305
|
let M;
|
|
306
306
|
const k = (g, p, w) => {
|
|
@@ -315,7 +315,7 @@ const Q = (e) => {
|
|
|
315
315
|
try {
|
|
316
316
|
t.value = new e.value.Map("map", ((p = C.value) == null ? void 0 : p.mapOpt) ?? {});
|
|
317
317
|
} catch {
|
|
318
|
-
|
|
318
|
+
r.value = !1, z.error(E("thirdPartyMapErrorRetry"));
|
|
319
319
|
}
|
|
320
320
|
const g = new e.value.NavigationControl({
|
|
321
321
|
// @ts-ignore
|
|
@@ -323,22 +323,22 @@ const Q = (e) => {
|
|
|
323
323
|
// @ts-ignore
|
|
324
324
|
type: BMAP_NAVIGATION_CONTROL_ZOOM
|
|
325
325
|
});
|
|
326
|
-
t.value.addControl(g), t.value.enableScrollWheelZoom(!0), i(), (w = C.value) != null && w.clickStream || h(),
|
|
326
|
+
t.value.addControl(g), t.value.enableScrollWheelZoom(!0), i(), (w = C.value) != null && w.clickStream || h(), r.value = !1, M && M();
|
|
327
327
|
}, c = (g) => new Promise((p, w) => {
|
|
328
328
|
new e.value.Geocoder().getPoint(g, (d) => {
|
|
329
329
|
!d || JSON.stringify(d) == "{}" ? (z.error(E("thirdPartyMapErrorRetry")), w()) : (o.value[0] = d.lng, o.value[1] = d.lat, p(d));
|
|
330
330
|
});
|
|
331
331
|
}), i = async () => {
|
|
332
|
-
!
|
|
332
|
+
!n.value && !o.value.length && R(), n.value && o.value.length > 0 ? await A(o.value[0], o.value[1]) : n.value ? await c(n.value) : o.value.length > 0 && await A(o.value[0], o.value[1], !0), n.value && _(n.value, (g, p) => {
|
|
333
333
|
if (p && p.length) {
|
|
334
334
|
const w = p.find(
|
|
335
|
-
(j) => j.value ===
|
|
335
|
+
(j) => j.value === n.value || j.info.name === n.value
|
|
336
336
|
);
|
|
337
337
|
w ? v.value = w.info : v.value = {
|
|
338
338
|
province: "",
|
|
339
339
|
city: "",
|
|
340
340
|
address: "",
|
|
341
|
-
name:
|
|
341
|
+
name: n.value
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
344
|
});
|
|
@@ -352,7 +352,7 @@ const Q = (e) => {
|
|
|
352
352
|
const y = new e.value.Geocoder(), x = new e.value.Point(g, p);
|
|
353
353
|
y.getLocation(x, (m) => {
|
|
354
354
|
if (w) {
|
|
355
|
-
|
|
355
|
+
n.value = m.address;
|
|
356
356
|
const { province: O = "", city: N = "", district: B = "" } = m.addressComponents;
|
|
357
357
|
v.value = {
|
|
358
358
|
province: O,
|
|
@@ -361,7 +361,7 @@ const Q = (e) => {
|
|
|
361
361
|
name: m.address.replace(O, "").replace(N, "").replace(B, "")
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
-
m && m.address ? (j == "default" && (o.value[0] = m.point.lng, o.value[1] = m.point.lat, a.value && t.value.clearOverlays(), a.value = new e.value.Marker(x, { title:
|
|
364
|
+
m && m.address ? (j == "default" && (o.value[0] = m.point.lng, o.value[1] = m.point.lat, a.value && t.value.clearOverlays(), a.value = new e.value.Marker(x, { title: n.value }), t.value.addOverlay(a.value), t.value.centerAndZoom(x, 16)), U(g, p), d(m.address)) : (z.error(E("thirdPartyMapErrorRetry")), f());
|
|
365
365
|
});
|
|
366
366
|
}), R = () => {
|
|
367
367
|
new e.value.LocalCity().get((p) => {
|
|
@@ -399,11 +399,11 @@ const Q = (e) => {
|
|
|
399
399
|
}).search(g);
|
|
400
400
|
}, $ = (g) => {
|
|
401
401
|
var p, w;
|
|
402
|
-
|
|
402
|
+
n.value = g.value, v.value = g.info, A((p = g.point) == null ? void 0 : p.lng, (w = g.point) == null ? void 0 : w.lat);
|
|
403
403
|
}, G = () => {
|
|
404
404
|
var g;
|
|
405
405
|
if (!l.value.length) return z.error(E("thirdPartyMapErrorRetry"));
|
|
406
|
-
if (
|
|
406
|
+
if (n.value = l.value[0].value, v.value = l.value[0].info, !((g = l.value[0]) != null && g.point))
|
|
407
407
|
return z.error(E("thirdPartyMapErrorRetry"));
|
|
408
408
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], A(o.value[0], o.value[1]), u.value.activated = !1;
|
|
409
409
|
}, U = async (g, p) => {
|
|
@@ -418,7 +418,7 @@ const Q = (e) => {
|
|
|
418
418
|
longitude: o.value[0],
|
|
419
419
|
latitude: o.value[1],
|
|
420
420
|
adCode: s.value,
|
|
421
|
-
address:
|
|
421
|
+
address: n.value,
|
|
422
422
|
addressInfo: v.value
|
|
423
423
|
}),
|
|
424
424
|
loadJavascript: k
|
|
@@ -436,15 +436,15 @@ const Q = (e) => {
|
|
|
436
436
|
dev: { type: Boolean }
|
|
437
437
|
},
|
|
438
438
|
setup(e, { expose: t }) {
|
|
439
|
-
const a = e,
|
|
439
|
+
const a = e, r = I(null), u = I(null), l = I(null), n = S(!0), o = S(null), s = S([]), v = Se(() => ({
|
|
440
440
|
width: a.width ? Q(a.width) : "100%",
|
|
441
441
|
height: a.height ? Q(a.height) : "100%"
|
|
442
442
|
})), b = S(""), C = S([]), M = S(""), k = S(), { getLocationByInputSearch: L, handleSelectAddress: c, getLocationParse: i, getMapInfo: h, loadJavascript: A } = ft(
|
|
443
443
|
{
|
|
444
|
-
BMap:
|
|
444
|
+
BMap: r,
|
|
445
445
|
map: u,
|
|
446
446
|
marker: l,
|
|
447
|
-
mapLoading:
|
|
447
|
+
mapLoading: n,
|
|
448
448
|
$autocomplete: o,
|
|
449
449
|
searchResultList: s,
|
|
450
450
|
innerInput: b,
|
|
@@ -500,7 +500,7 @@ const Q = (e) => {
|
|
|
500
500
|
), [
|
|
501
501
|
[
|
|
502
502
|
U,
|
|
503
|
-
|
|
503
|
+
n.value,
|
|
504
504
|
void 0,
|
|
505
505
|
{ lock: !0 }
|
|
506
506
|
]
|
|
@@ -529,8 +529,8 @@ function Ma(e) {
|
|
|
529
529
|
var t = this.__data__, a = pe(t, e);
|
|
530
530
|
if (a < 0)
|
|
531
531
|
return !1;
|
|
532
|
-
var
|
|
533
|
-
return a ==
|
|
532
|
+
var r = t.length - 1;
|
|
533
|
+
return a == r ? t.pop() : wa.call(t, a, 1), --this.size, !0;
|
|
534
534
|
}
|
|
535
535
|
function xa(e) {
|
|
536
536
|
var t = this.__data__, a = pe(t, e);
|
|
@@ -540,14 +540,14 @@ function Ca(e) {
|
|
|
540
540
|
return pe(this.__data__, e) > -1;
|
|
541
541
|
}
|
|
542
542
|
function Aa(e, t) {
|
|
543
|
-
var a = this.__data__,
|
|
544
|
-
return
|
|
543
|
+
var a = this.__data__, r = pe(a, e);
|
|
544
|
+
return r < 0 ? (++this.size, a.push([e, t])) : a[r][1] = t, this;
|
|
545
545
|
}
|
|
546
546
|
function H(e) {
|
|
547
547
|
var t = -1, a = e == null ? 0 : e.length;
|
|
548
548
|
for (this.clear(); ++t < a; ) {
|
|
549
|
-
var
|
|
550
|
-
this.set(
|
|
549
|
+
var r = e[t];
|
|
550
|
+
this.set(r[0], r[1]);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
H.prototype.clear = ba;
|
|
@@ -573,11 +573,11 @@ function Pa(e) {
|
|
|
573
573
|
var t = La.call(e, ue), a = e[ue];
|
|
574
574
|
try {
|
|
575
575
|
e[ue] = void 0;
|
|
576
|
-
var
|
|
576
|
+
var r = !0;
|
|
577
577
|
} catch {
|
|
578
578
|
}
|
|
579
579
|
var u = Ea.call(e);
|
|
580
|
-
return
|
|
580
|
+
return r && (t ? e[ue] = a : delete e[ue]), u;
|
|
581
581
|
}
|
|
582
582
|
var ka = Object.prototype, Ra = ka.toString;
|
|
583
583
|
function Ga(e) {
|
|
@@ -665,8 +665,8 @@ function vo(e, t) {
|
|
|
665
665
|
function q(e) {
|
|
666
666
|
var t = -1, a = e == null ? 0 : e.length;
|
|
667
667
|
for (this.clear(); ++t < a; ) {
|
|
668
|
-
var
|
|
669
|
-
this.set(
|
|
668
|
+
var r = e[t];
|
|
669
|
+
this.set(r[0], r[1]);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
q.prototype.clear = ao;
|
|
@@ -700,14 +700,14 @@ function mo(e) {
|
|
|
700
700
|
return he(this, e).has(e);
|
|
701
701
|
}
|
|
702
702
|
function bo(e, t) {
|
|
703
|
-
var a = he(this, e),
|
|
704
|
-
return a.set(e, t), this.size += a.size ==
|
|
703
|
+
var a = he(this, e), r = a.size;
|
|
704
|
+
return a.set(e, t), this.size += a.size == r ? 0 : 1, this;
|
|
705
705
|
}
|
|
706
706
|
function ae(e) {
|
|
707
707
|
var t = -1, a = e == null ? 0 : e.length;
|
|
708
708
|
for (this.clear(); ++t < a; ) {
|
|
709
|
-
var
|
|
710
|
-
this.set(
|
|
709
|
+
var r = e[t];
|
|
710
|
+
this.set(r[0], r[1]);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
ae.prototype.clear = go;
|
|
@@ -719,10 +719,10 @@ var _o = 200;
|
|
|
719
719
|
function wo(e, t) {
|
|
720
720
|
var a = this.__data__;
|
|
721
721
|
if (a instanceof H) {
|
|
722
|
-
var
|
|
723
|
-
if (!pt ||
|
|
724
|
-
return
|
|
725
|
-
a = this.__data__ = new ae(
|
|
722
|
+
var r = a.__data__;
|
|
723
|
+
if (!pt || r.length < _o - 1)
|
|
724
|
+
return r.push([e, t]), this.size = ++a.size, this;
|
|
725
|
+
a = this.__data__ = new ae(r);
|
|
726
726
|
}
|
|
727
727
|
return a.set(e, t), this.size = a.size, this;
|
|
728
728
|
}
|
|
@@ -754,9 +754,9 @@ function _e(e, t, a) {
|
|
|
754
754
|
(a !== void 0 && !ge(e[t], a) || a === void 0 && !(t in e)) && Ne(e, t, a);
|
|
755
755
|
}
|
|
756
756
|
function Mo(e) {
|
|
757
|
-
return function(t, a,
|
|
758
|
-
for (var u = -1, l = Object(t),
|
|
759
|
-
var s =
|
|
757
|
+
return function(t, a, r) {
|
|
758
|
+
for (var u = -1, l = Object(t), n = r(t), o = n.length; o--; ) {
|
|
759
|
+
var s = n[++u];
|
|
760
760
|
if (a(l[s], s, l) === !1)
|
|
761
761
|
break;
|
|
762
762
|
}
|
|
@@ -778,8 +778,8 @@ function Oo(e, t) {
|
|
|
778
778
|
return new e.constructor(a, e.byteOffset, e.length);
|
|
779
779
|
}
|
|
780
780
|
function To(e, t) {
|
|
781
|
-
var a = -1,
|
|
782
|
-
for (t || (t = Array(
|
|
781
|
+
var a = -1, r = e.length;
|
|
782
|
+
for (t || (t = Array(r)); ++a < r; )
|
|
783
783
|
t[a] = e[a];
|
|
784
784
|
return t;
|
|
785
785
|
}
|
|
@@ -867,22 +867,22 @@ function Me(e, t) {
|
|
|
867
867
|
}
|
|
868
868
|
var _r = Object.prototype, wr = _r.hasOwnProperty;
|
|
869
869
|
function Mr(e, t, a) {
|
|
870
|
-
var
|
|
871
|
-
(!(wr.call(e, t) && ge(
|
|
870
|
+
var r = e[t];
|
|
871
|
+
(!(wr.call(e, t) && ge(r, a)) || a === void 0 && !(t in e)) && Ne(e, t, a);
|
|
872
872
|
}
|
|
873
|
-
function xr(e, t, a,
|
|
873
|
+
function xr(e, t, a, r) {
|
|
874
874
|
var u = !a;
|
|
875
875
|
a || (a = {});
|
|
876
|
-
for (var l = -1,
|
|
876
|
+
for (var l = -1, n = t.length; ++l < n; ) {
|
|
877
877
|
var o = t[l], s = void 0;
|
|
878
878
|
s === void 0 && (s = e[o]), u ? Ne(a, o, s) : Mr(a, o, s);
|
|
879
879
|
}
|
|
880
880
|
return a;
|
|
881
881
|
}
|
|
882
882
|
function Cr(e, t) {
|
|
883
|
-
for (var a = -1,
|
|
884
|
-
|
|
885
|
-
return
|
|
883
|
+
for (var a = -1, r = Array(e); ++a < e; )
|
|
884
|
+
r[a] = t(a);
|
|
885
|
+
return r;
|
|
886
886
|
}
|
|
887
887
|
var Ar = 9007199254740991, Sr = /^(?:0|[1-9]\d*)$/;
|
|
888
888
|
function St(e, t) {
|
|
@@ -890,9 +890,9 @@ function St(e, t) {
|
|
|
890
890
|
return t = t ?? Ar, !!t && (a == "number" || a != "symbol" && Sr.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
891
891
|
}
|
|
892
892
|
function Or(e, t) {
|
|
893
|
-
var a = ve(e),
|
|
893
|
+
var a = ve(e), r = !a && we(e), u = !a && !r && Mt(e), l = !a && !r && !u && At(e), n = a || r || u || l, o = n ? Cr(e.length, String) : [], s = o.length;
|
|
894
894
|
for (var v in e)
|
|
895
|
-
|
|
895
|
+
n && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
896
896
|
(v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
897
897
|
u && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
898
898
|
l && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
|
|
@@ -911,8 +911,8 @@ function Lr(e) {
|
|
|
911
911
|
if (!Y(e))
|
|
912
912
|
return Tr(e);
|
|
913
913
|
var t = mt(e), a = [];
|
|
914
|
-
for (var
|
|
915
|
-
|
|
914
|
+
for (var r in e)
|
|
915
|
+
r == "constructor" && (t || !jr.call(e, r)) || a.push(r);
|
|
916
916
|
return a;
|
|
917
917
|
}
|
|
918
918
|
function Ot(e) {
|
|
@@ -921,26 +921,26 @@ function Ot(e) {
|
|
|
921
921
|
function Er(e) {
|
|
922
922
|
return xr(e, Ot(e));
|
|
923
923
|
}
|
|
924
|
-
function Pr(e, t, a,
|
|
925
|
-
var o = Me(e, a), s = Me(t, a), v =
|
|
924
|
+
function Pr(e, t, a, r, u, l, n) {
|
|
925
|
+
var o = Me(e, a), s = Me(t, a), v = n.get(s);
|
|
926
926
|
if (v) {
|
|
927
927
|
_e(e, a, v);
|
|
928
928
|
return;
|
|
929
929
|
}
|
|
930
|
-
var b = l ? l(o, s, a + "", e, t,
|
|
930
|
+
var b = l ? l(o, s, a + "", e, t, n) : void 0, C = b === void 0;
|
|
931
931
|
if (C) {
|
|
932
932
|
var M = ve(s), k = !M && Mt(s), L = !M && !k && At(s);
|
|
933
933
|
b = s, M || k || L ? ve(o) ? b = o : Bo(o) ? b = To(o) : k ? (C = !1, b = Ao(s)) : L ? (C = !1, b = Oo(s)) : b = [] : Ho(s) || we(s) ? (b = o, we(o) ? b = Er(o) : (!Y(o) || De(o)) && (b = Eo(s))) : C = !1;
|
|
934
934
|
}
|
|
935
|
-
C && (
|
|
935
|
+
C && (n.set(s, b), u(b, s, r, l, n), n.delete(s)), _e(e, a, b);
|
|
936
936
|
}
|
|
937
|
-
function Tt(e, t, a,
|
|
938
|
-
e !== t && xo(t, function(l,
|
|
937
|
+
function Tt(e, t, a, r, u) {
|
|
938
|
+
e !== t && xo(t, function(l, n) {
|
|
939
939
|
if (u || (u = new oe()), Y(l))
|
|
940
|
-
Pr(e, t,
|
|
940
|
+
Pr(e, t, n, a, Tt, r, u);
|
|
941
941
|
else {
|
|
942
|
-
var o =
|
|
943
|
-
o === void 0 && (o = l), _e(e,
|
|
942
|
+
var o = r ? r(Me(e, n), l, n + "", e, t, u) : void 0;
|
|
943
|
+
o === void 0 && (o = l), _e(e, n, o);
|
|
944
944
|
}
|
|
945
945
|
}, Ot);
|
|
946
946
|
}
|
|
@@ -963,12 +963,12 @@ function kr(e, t, a) {
|
|
|
963
963
|
var tt = Math.max;
|
|
964
964
|
function Rr(e, t, a) {
|
|
965
965
|
return t = tt(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
966
|
-
for (var
|
|
967
|
-
|
|
966
|
+
for (var r = arguments, u = -1, l = tt(r.length - t, 0), n = Array(l); ++u < l; )
|
|
967
|
+
n[u] = r[t + u];
|
|
968
968
|
u = -1;
|
|
969
969
|
for (var o = Array(t + 1); ++u < t; )
|
|
970
|
-
o[u] =
|
|
971
|
-
return o[t] = a(
|
|
970
|
+
o[u] = r[u];
|
|
971
|
+
return o[t] = a(n), kr(e, this, o);
|
|
972
972
|
};
|
|
973
973
|
}
|
|
974
974
|
function Gr(e) {
|
|
@@ -987,8 +987,8 @@ var Br = fe ? function(e, t) {
|
|
|
987
987
|
function Ur(e) {
|
|
988
988
|
var t = 0, a = 0;
|
|
989
989
|
return function() {
|
|
990
|
-
var
|
|
991
|
-
if (a =
|
|
990
|
+
var r = Nr(), u = zr - (r - a);
|
|
991
|
+
if (a = r, u > 0) {
|
|
992
992
|
if (++t >= Dr)
|
|
993
993
|
return arguments[0];
|
|
994
994
|
} else
|
|
@@ -1003,21 +1003,21 @@ function Fr(e, t) {
|
|
|
1003
1003
|
function Kr(e, t, a) {
|
|
1004
1004
|
if (!Y(a))
|
|
1005
1005
|
return !1;
|
|
1006
|
-
var
|
|
1007
|
-
return (
|
|
1006
|
+
var r = typeof t;
|
|
1007
|
+
return (r == "number" ? Ue(a) && St(t, a.length) : r == "string" && t in a) ? ge(a[t], e) : !1;
|
|
1008
1008
|
}
|
|
1009
1009
|
function Ir(e) {
|
|
1010
1010
|
return Fr(function(t, a) {
|
|
1011
|
-
var
|
|
1012
|
-
for (l = e.length > 3 && typeof l == "function" ? (u--, l) : void 0,
|
|
1013
|
-
var o = a[
|
|
1014
|
-
o && e(t, o,
|
|
1011
|
+
var r = -1, u = a.length, l = u > 1 ? a[u - 1] : void 0, n = u > 2 ? a[2] : void 0;
|
|
1012
|
+
for (l = e.length > 3 && typeof l == "function" ? (u--, l) : void 0, n && Kr(a[0], a[1], n) && (l = u < 3 ? void 0 : l, u = 1), t = Object(t); ++r < u; ) {
|
|
1013
|
+
var o = a[r];
|
|
1014
|
+
o && e(t, o, r, l);
|
|
1015
1015
|
}
|
|
1016
1016
|
return t;
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
var Hr = Ir(function(e, t, a,
|
|
1020
|
-
Tt(e, t, a,
|
|
1019
|
+
var Hr = Ir(function(e, t, a, r) {
|
|
1020
|
+
Tt(e, t, a, r);
|
|
1021
1021
|
}), Jr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1022
1022
|
function Zr(e) {
|
|
1023
1023
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -1027,10 +1027,10 @@ var jt = { exports: {} };
|
|
|
1027
1027
|
(function(t, a) {
|
|
1028
1028
|
e.exports ? e.exports = a() : t.coordtransform = a();
|
|
1029
1029
|
})(Jr, function() {
|
|
1030
|
-
var t = 52.35987755982988, a = 3.141592653589793,
|
|
1030
|
+
var t = 52.35987755982988, a = 3.141592653589793, r = 6378245, u = 0.006693421622965943, l = function(c, i) {
|
|
1031
1031
|
var c = +c, i = +i, h = c - 65e-4, A = i - 6e-3, R = Math.sqrt(h * h + A * A) - 2e-5 * Math.sin(A * t), _ = Math.atan2(A, h) - 3e-6 * Math.cos(h * t), $ = R * Math.cos(_), G = R * Math.sin(_);
|
|
1032
1032
|
return [$, G];
|
|
1033
|
-
},
|
|
1033
|
+
}, n = function(i, c) {
|
|
1034
1034
|
var c = +c, i = +i, h = Math.sqrt(i * i + c * c) + 2e-5 * Math.sin(c * t), A = Math.atan2(c, i) + 3e-6 * Math.cos(i * t), R = h * Math.cos(A) + 65e-4, _ = h * Math.sin(A) + 6e-3;
|
|
1035
1035
|
return [R, _];
|
|
1036
1036
|
}, o = function(i, c) {
|
|
@@ -1040,7 +1040,7 @@ var jt = { exports: {} };
|
|
|
1040
1040
|
var h = v(i - 105, c - 35), A = b(i - 105, c - 35), R = c / 180 * a, _ = Math.sin(R);
|
|
1041
1041
|
_ = 1 - u * _ * _;
|
|
1042
1042
|
var $ = Math.sqrt(_);
|
|
1043
|
-
h = h * 180 / (
|
|
1043
|
+
h = h * 180 / (r * (1 - u) / (_ * $) * a), A = A * 180 / (r / $ * Math.cos(R) * a);
|
|
1044
1044
|
var G = c + h, U = i + A;
|
|
1045
1045
|
return [U, G];
|
|
1046
1046
|
}, s = function(i, c) {
|
|
@@ -1050,7 +1050,7 @@ var jt = { exports: {} };
|
|
|
1050
1050
|
var h = v(i - 105, c - 35), A = b(i - 105, c - 35), R = c / 180 * a, _ = Math.sin(R);
|
|
1051
1051
|
_ = 1 - u * _ * _;
|
|
1052
1052
|
var $ = Math.sqrt(_);
|
|
1053
|
-
h = h * 180 / (
|
|
1053
|
+
h = h * 180 / (r * (1 - u) / (_ * $) * a), A = A * 180 / (r / $ * Math.cos(R) * a);
|
|
1054
1054
|
var G = c + h, U = i + A;
|
|
1055
1055
|
return [i * 2 - U, c * 2 - G];
|
|
1056
1056
|
}, v = function(i, c) {
|
|
@@ -1065,25 +1065,25 @@ var jt = { exports: {} };
|
|
|
1065
1065
|
};
|
|
1066
1066
|
return {
|
|
1067
1067
|
bd09togcj02: l,
|
|
1068
|
-
gcj02tobd09:
|
|
1068
|
+
gcj02tobd09: n,
|
|
1069
1069
|
wgs84togcj02: o,
|
|
1070
1070
|
gcj02towgs84: s
|
|
1071
1071
|
};
|
|
1072
1072
|
});
|
|
1073
1073
|
})(jt);
|
|
1074
1074
|
var Wr = jt.exports;
|
|
1075
|
-
const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL:
|
|
1076
|
-
const l = (
|
|
1075
|
+
const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) => {
|
|
1076
|
+
const l = (n, o) => {
|
|
1077
1077
|
const s = document.createElement("div");
|
|
1078
1078
|
s.style.cursor = "pointer";
|
|
1079
|
-
const v = Qt(
|
|
1079
|
+
const v = Qt(n, o);
|
|
1080
1080
|
return ea(v, s), s;
|
|
1081
1081
|
};
|
|
1082
|
-
e.addCustomComponent = (
|
|
1083
|
-
!Array.isArray(
|
|
1082
|
+
e.addCustomComponent = (n) => {
|
|
1083
|
+
!Array.isArray(n) || (n == null ? void 0 : n.length) === 0 || n.forEach((o) => {
|
|
1084
1084
|
const { component: s, componentProps: v, lng: b, lat: C, markerOptions: M = {} } = o, k = typeof v == "function" ? v() : v, L = typeof s == "function" ? s() : s, c = () => l(L, k);
|
|
1085
1085
|
if (a.value === "baidu") {
|
|
1086
|
-
const i = Lt.gcj02tobd09(b, C), h = new
|
|
1086
|
+
const i = Lt.gcj02tobd09(b, C), h = new r.value.CustomOverlay(c, {
|
|
1087
1087
|
point: { lng: i[0], lat: i[1] },
|
|
1088
1088
|
...M
|
|
1089
1089
|
});
|
|
@@ -1092,8 +1092,8 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: n, map: u }) =>
|
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
if (a.value === "gaode") {
|
|
1095
|
-
const i = l(L, k), h = new
|
|
1096
|
-
u.value.add(h),
|
|
1095
|
+
const i = l(L, k), h = new r.value.Marker({ content: i, position: [b, C], ...M });
|
|
1096
|
+
u.value.add(h), r.value.event.addListener(h, "click", function(A) {
|
|
1097
1097
|
t("click-custom-component", o, A);
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
@@ -1102,14 +1102,14 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: n, map: u }) =>
|
|
|
1102
1102
|
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1103
1103
|
__proto__: null,
|
|
1104
1104
|
default: qr
|
|
1105
|
-
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL:
|
|
1105
|
+
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL: r, map: u, innerPoint: l, innerInput: n, adCode: o, addressInfo: s }) => {
|
|
1106
1106
|
e.getMapInfo = () => {
|
|
1107
1107
|
if (a.value === "baidu") {
|
|
1108
1108
|
const v = Lt.bd09togcj02(l.value[0], l.value[1]);
|
|
1109
1109
|
return {
|
|
1110
1110
|
longitude: v[0],
|
|
1111
1111
|
latitude: v[1],
|
|
1112
|
-
address:
|
|
1112
|
+
address: n.value,
|
|
1113
1113
|
adCode: o.value,
|
|
1114
1114
|
addressInfo: s.value
|
|
1115
1115
|
};
|
|
@@ -1118,7 +1118,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: n, map: u }) =>
|
|
|
1118
1118
|
return {
|
|
1119
1119
|
longitude: l.value[0],
|
|
1120
1120
|
latitude: l.value[1],
|
|
1121
|
-
address:
|
|
1121
|
+
address: n.value,
|
|
1122
1122
|
adCode: o.value,
|
|
1123
1123
|
addressInfo: s.value
|
|
1124
1124
|
};
|
|
@@ -1126,7 +1126,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: n, map: u }) =>
|
|
|
1126
1126
|
return {
|
|
1127
1127
|
longitude: l.value[0],
|
|
1128
1128
|
latitude: l.value[1],
|
|
1129
|
-
address:
|
|
1129
|
+
address: n.value,
|
|
1130
1130
|
adCode: o.value,
|
|
1131
1131
|
addressInfo: s.value
|
|
1132
1132
|
};
|
|
@@ -1136,7 +1136,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: n, map: u }) =>
|
|
|
1136
1136
|
default: Xr
|
|
1137
1137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1138
1138
|
function en(e, t) {
|
|
1139
|
-
for (var a = -1,
|
|
1139
|
+
for (var a = -1, r = e == null ? 0 : e.length, u = Array(r); ++a < r; )
|
|
1140
1140
|
u[a] = t(e[a], a, e);
|
|
1141
1141
|
return u;
|
|
1142
1142
|
}
|
|
@@ -1159,15 +1159,15 @@ function ye(e) {
|
|
|
1159
1159
|
return e == null ? "" : Et(e);
|
|
1160
1160
|
}
|
|
1161
1161
|
function rn(e, t, a) {
|
|
1162
|
-
var
|
|
1162
|
+
var r = -1, u = e.length;
|
|
1163
1163
|
t < 0 && (t = -t > u ? 0 : u + t), a = a > u ? u : a, a < 0 && (a += u), u = t > a ? 0 : a - t >>> 0, t >>>= 0;
|
|
1164
|
-
for (var l = Array(u); ++
|
|
1165
|
-
l[
|
|
1164
|
+
for (var l = Array(u); ++r < u; )
|
|
1165
|
+
l[r] = e[r + t];
|
|
1166
1166
|
return l;
|
|
1167
1167
|
}
|
|
1168
1168
|
function nn(e, t, a) {
|
|
1169
|
-
var
|
|
1170
|
-
return a = a === void 0 ?
|
|
1169
|
+
var r = e.length;
|
|
1170
|
+
return a = a === void 0 ? r : a, !t && a >= r ? e : rn(e, t, a);
|
|
1171
1171
|
}
|
|
1172
1172
|
var ln = "\\ud800-\\udfff", un = "\\u0300-\\u036f", cn = "\\ufe20-\\ufe2f", sn = "\\u20d0-\\u20ff", dn = un + cn + sn, fn = "\\ufe0e\\ufe0f", vn = "\\u200d", gn = RegExp("[" + vn + ln + dn + fn + "]");
|
|
1173
1173
|
function Pt(e) {
|
|
@@ -1186,15 +1186,15 @@ function $n(e) {
|
|
|
1186
1186
|
function jn(e) {
|
|
1187
1187
|
return function(t) {
|
|
1188
1188
|
t = ye(t);
|
|
1189
|
-
var a = Pt(t) ? $n(t) : void 0,
|
|
1190
|
-
return
|
|
1189
|
+
var a = Pt(t) ? $n(t) : void 0, r = a ? a[0] : t.charAt(0), u = a ? nn(a, 1).join("") : t.slice(1);
|
|
1190
|
+
return r[e]() + u;
|
|
1191
1191
|
};
|
|
1192
1192
|
}
|
|
1193
1193
|
var Ln = jn("toUpperCase");
|
|
1194
1194
|
function En(e) {
|
|
1195
1195
|
return Ln(ye(e).toLowerCase());
|
|
1196
1196
|
}
|
|
1197
|
-
function Pn(e, t, a,
|
|
1197
|
+
function Pn(e, t, a, r) {
|
|
1198
1198
|
for (var u = -1, l = e == null ? 0 : e.length; ++u < l; )
|
|
1199
1199
|
a = t(a, e[u], u, e);
|
|
1200
1200
|
return a;
|
|
@@ -1438,14 +1438,14 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1438
1438
|
const a = Ml(t.replace("./", "").split("/")[0]);
|
|
1439
1439
|
return e[a] = it[t].default, e;
|
|
1440
1440
|
}, {}), Cl = (e, t, a) => {
|
|
1441
|
-
const
|
|
1442
|
-
return { mapElement:
|
|
1443
|
-
const
|
|
1441
|
+
const r = S({});
|
|
1442
|
+
return { mapElement: r, addPlugins: () => {
|
|
1443
|
+
const n = Hr({}, (e == null ? void 0 : e.options) || {}, (o, s) => {
|
|
1444
1444
|
if (Array.isArray(o)) return o.concat(s);
|
|
1445
1445
|
});
|
|
1446
|
-
Object.values(xl).forEach((o) => o(
|
|
1446
|
+
Object.values(xl).forEach((o) => o(r.value, t, a, n.plugins || {}));
|
|
1447
1447
|
} };
|
|
1448
|
-
}, Al = ({ MapGL: e, map: t, marker: a, mapLoading:
|
|
1448
|
+
}, Al = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
1449
1449
|
const C = S(), M = S(), k = S();
|
|
1450
1450
|
let L = null;
|
|
1451
1451
|
const c = S(!1), i = S();
|
|
@@ -1477,7 +1477,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1477
1477
|
gestureHandling: "greedy",
|
|
1478
1478
|
// 谷歌地图api缩放去掉ctrl+滚轮缩放,直接鼠标缩放
|
|
1479
1479
|
...O
|
|
1480
|
-
}), await $(), (B = i.value) != null && B.clickStream || _(),
|
|
1480
|
+
}), await $(), (B = i.value) != null && B.clickStream || _(), r.value = !1, c.value = !n.value && !o.value.length, h && h();
|
|
1481
1481
|
}, _ = () => {
|
|
1482
1482
|
var d;
|
|
1483
1483
|
(d = t.value) == null || d.addListener("click", (f) => {
|
|
@@ -1491,22 +1491,22 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1491
1491
|
a.value = new L({
|
|
1492
1492
|
map: t.value,
|
|
1493
1493
|
position: m,
|
|
1494
|
-
title:
|
|
1494
|
+
title: n.value
|
|
1495
1495
|
// 鼠标移上去时显示的内容
|
|
1496
1496
|
}), (O = t.value) == null || O.panTo(m);
|
|
1497
1497
|
});
|
|
1498
1498
|
});
|
|
1499
1499
|
}, $ = async () => {
|
|
1500
1500
|
var d;
|
|
1501
|
-
if (!
|
|
1501
|
+
if (!n.value && o.value.length, n.value && o.value.length > 0 ? await G(o.value) : n.value ? await U(n.value) : o.value.length > 0 && await G(o.value, !0), n.value && g(n.value, (f, y) => {
|
|
1502
1502
|
if (y && y.length) {
|
|
1503
1503
|
const x = y.find(
|
|
1504
|
-
(m) => m.value ===
|
|
1504
|
+
(m) => m.value === n.value || m.info.name === n.value
|
|
1505
1505
|
);
|
|
1506
1506
|
x ? v.value = x.info : v.value = {
|
|
1507
1507
|
district: "",
|
|
1508
1508
|
address: "",
|
|
1509
|
-
name:
|
|
1509
|
+
name: n.value
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
1512
|
}), o.value.length) {
|
|
@@ -1517,7 +1517,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1517
1517
|
a.value = new L({
|
|
1518
1518
|
map: t.value,
|
|
1519
1519
|
position: f,
|
|
1520
|
-
title:
|
|
1520
|
+
title: n.value
|
|
1521
1521
|
// 鼠标移上去时显示的内容
|
|
1522
1522
|
}), o.value.length && ((d = t.value) == null || d.setCenter(f));
|
|
1523
1523
|
}
|
|
@@ -1528,34 +1528,36 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1528
1528
|
lat: parseFloat(d[1])
|
|
1529
1529
|
}
|
|
1530
1530
|
}, (O, N) => {
|
|
1531
|
-
N === "OK" && (O != null && O.length) ? (f && (
|
|
1531
|
+
N === "OK" && (O != null && O.length) ? (f && (n.value = O[0].formatted_address ?? "", v.value = {
|
|
1532
1532
|
district: "",
|
|
1533
1533
|
address: "",
|
|
1534
|
-
name:
|
|
1534
|
+
name: n.value
|
|
1535
1535
|
}), y(O[0])) : (z.error(E("thirdPartyMapErrorRetry")), x());
|
|
1536
1536
|
});
|
|
1537
1537
|
})), U = (d) => new Promise((f, y) => {
|
|
1538
1538
|
new google.maps.Geocoder().geocode({
|
|
1539
|
-
address:
|
|
1539
|
+
address: n.value
|
|
1540
1540
|
}, (m, O) => {
|
|
1541
1541
|
O === "OK" && (m != null && m.length) ? (o.value[0] = m[0].geometry.location.lng(), o.value[1] = m[0].geometry.location.lat(), f({ lng: o.value[0], lat: o.value[1] })) : (z.error(E("thirdPartyMapErrorRetry")), y());
|
|
1542
1542
|
});
|
|
1543
1543
|
}), T = async () => {
|
|
1544
1544
|
var d;
|
|
1545
|
-
navigator.geolocation && ((d = navigator.geolocation) == null || d.getCurrentPosition((f) => {
|
|
1545
|
+
r.value = !0, navigator.geolocation && ((d = navigator.geolocation) == null || d.getCurrentPosition((f) => {
|
|
1546
1546
|
var x;
|
|
1547
1547
|
const y = {
|
|
1548
1548
|
lat: f.coords.latitude,
|
|
1549
1549
|
lng: f.coords.longitude
|
|
1550
1550
|
};
|
|
1551
|
-
(x = t.value) == null || x.panTo(y), c.value = !1;
|
|
1551
|
+
(x = t.value) == null || x.panTo(y), c.value = !1, r.value = !1;
|
|
1552
1552
|
}, (f) => {
|
|
1553
|
-
z.error(E("获取定位失败"));
|
|
1553
|
+
z.error(E("获取定位失败")), r.value = !1;
|
|
1554
1554
|
}, {
|
|
1555
1555
|
// enableHighAccuracy: true,
|
|
1556
1556
|
// timeout: 5000,
|
|
1557
1557
|
// maximumAge: 0,
|
|
1558
1558
|
// enableHighAccuracy: true
|
|
1559
|
+
enableHighAccuracy: !0,
|
|
1560
|
+
timeout: 5e3
|
|
1559
1561
|
}));
|
|
1560
1562
|
}, g = async (d, f) => {
|
|
1561
1563
|
if (u.value.activated = !0, !d) {
|
|
@@ -1596,12 +1598,12 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1596
1598
|
return {
|
|
1597
1599
|
getLocationByInputSearch: g,
|
|
1598
1600
|
handleSelectAddress: (d) => {
|
|
1599
|
-
|
|
1601
|
+
n.value = d.value, v.value = d.info, U(d.value).then((f) => {
|
|
1600
1602
|
var y;
|
|
1601
1603
|
o.value = [f.lng, f.lat], a.value && a.value.setMap(null), a.value = new L({
|
|
1602
1604
|
map: t.value,
|
|
1603
1605
|
position: f,
|
|
1604
|
-
title:
|
|
1606
|
+
title: n.value
|
|
1605
1607
|
// 鼠标移上去时显示的内容
|
|
1606
1608
|
}), (y = t.value) == null || y.panTo(f), c.value = !1;
|
|
1607
1609
|
});
|
|
@@ -1609,12 +1611,12 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1609
1611
|
getLocationParse: async () => {
|
|
1610
1612
|
var d, f;
|
|
1611
1613
|
if (!l.value.length) return z.error(E("thirdPartyMapErrorRetry"));
|
|
1612
|
-
if (
|
|
1614
|
+
if (n.value = l.value[0].value, !((d = l.value[0]) != null && d.point))
|
|
1613
1615
|
return z.error(E("thirdPartyMapErrorRetry"));
|
|
1614
1616
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, a.value = new L({
|
|
1615
1617
|
map: t.value,
|
|
1616
1618
|
position: l.value[0].point,
|
|
1617
|
-
title:
|
|
1619
|
+
title: n.value
|
|
1618
1620
|
// 鼠标移上去时显示的内容
|
|
1619
1621
|
}), (f = t.value) == null || f.panTo(l.value[0].point), c.value = !1, u.value.activated = !1;
|
|
1620
1622
|
},
|
|
@@ -1622,7 +1624,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1622
1624
|
longitude: o.value[0],
|
|
1623
1625
|
latitude: o.value[1],
|
|
1624
1626
|
adCode: s.value,
|
|
1625
|
-
address:
|
|
1627
|
+
address: n.value,
|
|
1626
1628
|
addressInfo: v.value
|
|
1627
1629
|
}),
|
|
1628
1630
|
loadJavascript: A,
|
|
@@ -1630,7 +1632,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1630
1632
|
showGetLocationBtn: c
|
|
1631
1633
|
};
|
|
1632
1634
|
}, Sl = (e, t) => {
|
|
1633
|
-
const a = S("gaode"),
|
|
1635
|
+
const a = S("gaode"), r = S(), u = S(), l = I(null), n = I(null), o = I(null), s = S(!0), v = S(null), b = S([]), C = Se(() => ({
|
|
1634
1636
|
width: e.width ? Q(e.width) : "100%",
|
|
1635
1637
|
height: e.height ? Q(e.height) : "100%"
|
|
1636
1638
|
})), M = S(""), k = S([]), L = S(""), c = S(), {
|
|
@@ -1640,7 +1642,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1640
1642
|
getLocationParse: R
|
|
1641
1643
|
} = ft({
|
|
1642
1644
|
BMap: l,
|
|
1643
|
-
map:
|
|
1645
|
+
map: n,
|
|
1644
1646
|
marker: o,
|
|
1645
1647
|
mapLoading: s,
|
|
1646
1648
|
$autocomplete: v,
|
|
@@ -1656,7 +1658,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1656
1658
|
getLocationParse: U
|
|
1657
1659
|
} = st({
|
|
1658
1660
|
MapGL: l,
|
|
1659
|
-
map:
|
|
1661
|
+
map: n,
|
|
1660
1662
|
marker: o,
|
|
1661
1663
|
mapLoading: s,
|
|
1662
1664
|
$autocomplete: v,
|
|
@@ -1674,7 +1676,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1674
1676
|
showGetLocationBtn: d
|
|
1675
1677
|
} = Al({
|
|
1676
1678
|
MapGL: l,
|
|
1677
|
-
map:
|
|
1679
|
+
map: n,
|
|
1678
1680
|
marker: o,
|
|
1679
1681
|
mapLoading: s,
|
|
1680
1682
|
$autocomplete: v,
|
|
@@ -1686,19 +1688,19 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1686
1688
|
}), { mapElement: f, addPlugins: y } = Cl(e, t, {
|
|
1687
1689
|
type: a,
|
|
1688
1690
|
MapGL: l,
|
|
1689
|
-
map:
|
|
1691
|
+
map: n,
|
|
1690
1692
|
innerPoint: k,
|
|
1691
1693
|
innerInput: M,
|
|
1692
1694
|
adCode: L,
|
|
1693
1695
|
addressInfo: c
|
|
1694
1696
|
}), x = () => {
|
|
1695
|
-
a.value === "baidu" && i(
|
|
1696
|
-
|
|
1697
|
+
a.value === "baidu" && i(r.value, { clickStream: !e.clickStream, mapOpt: e.mapOpt }, O), a.value === "gaode" && _(
|
|
1698
|
+
r.value,
|
|
1697
1699
|
u.value,
|
|
1698
1700
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1699
1701
|
O
|
|
1700
1702
|
), a.value === "google" && T(
|
|
1701
|
-
|
|
1703
|
+
r.value,
|
|
1702
1704
|
u.value,
|
|
1703
1705
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1704
1706
|
O
|
|
@@ -1718,17 +1720,17 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1718
1720
|
Oe(async () => {
|
|
1719
1721
|
var V, F, J, le, Ve;
|
|
1720
1722
|
if (e.defaultLongitude && e.defaultLatitude && (k.value = [e.defaultLongitude, e.defaultLatitude]), M.value = e.defaultAddress ?? "", e != null && e.sdkConfig && ((V = e == null ? void 0 : e.sdkConfig) != null && V.akValue))
|
|
1721
|
-
a.value = ((F = e.sdkConfig) == null ? void 0 : F.mapType) ?? "gaode",
|
|
1723
|
+
a.value = ((F = e.sdkConfig) == null ? void 0 : F.mapType) ?? "gaode", r.value = (J = e.sdkConfig) == null ? void 0 : J.akValue, u.value = (le = e.sdkConfig) == null ? void 0 : le.secretKey;
|
|
1722
1724
|
else {
|
|
1723
1725
|
const K = await m((Ve = e == null ? void 0 : e.sdkConfig) == null ? void 0 : Ve.mapType);
|
|
1724
|
-
K && (a.value = (K == null ? void 0 : K.mapType) ?? "gaode",
|
|
1726
|
+
K && (a.value = (K == null ? void 0 : K.mapType) ?? "gaode", r.value = K == null ? void 0 : K.akVal, u.value = K == null ? void 0 : K.secretK);
|
|
1725
1727
|
}
|
|
1726
1728
|
x();
|
|
1727
1729
|
});
|
|
1728
1730
|
const O = () => {
|
|
1729
|
-
f.value =
|
|
1731
|
+
f.value = n.value, y(), a.value === "baidu" && n.value.addEventListener("tilesloaded", () => {
|
|
1730
1732
|
t("update:mapElement", f.value);
|
|
1731
|
-
}), a.value === "gaode" &&
|
|
1733
|
+
}), a.value === "gaode" && n.value.on("complete", () => {
|
|
1732
1734
|
t("update:mapElement", f.value);
|
|
1733
1735
|
}), a.value === "google" && t("update:mapElement", f.value);
|
|
1734
1736
|
};
|
|
@@ -1766,17 +1768,17 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1766
1768
|
},
|
|
1767
1769
|
emits: ["update:mapElement", "no-config-map", "click-custom-component"],
|
|
1768
1770
|
setup(e, { emit: t }) {
|
|
1769
|
-
const a = e,
|
|
1771
|
+
const a = e, r = t, {
|
|
1770
1772
|
mapStyle: u,
|
|
1771
1773
|
innerInput: l,
|
|
1772
|
-
getLocationByInputSearch:
|
|
1774
|
+
getLocationByInputSearch: n,
|
|
1773
1775
|
handleSelectAddress: o,
|
|
1774
1776
|
getLocationParse: s,
|
|
1775
1777
|
mapLoading: v,
|
|
1776
1778
|
$autocomplete: b,
|
|
1777
1779
|
googlePositionCityLocal: C,
|
|
1778
1780
|
showGetLocationBtn: M
|
|
1779
|
-
} = Sl(a,
|
|
1781
|
+
} = Sl(a, r);
|
|
1780
1782
|
return (k, L) => {
|
|
1781
1783
|
const c = Pe, i = ke;
|
|
1782
1784
|
return Te(), $e(
|
|
@@ -1796,7 +1798,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1796
1798
|
modelValue: D(l),
|
|
1797
1799
|
"onUpdate:modelValue": L[0] || (L[0] = (h) => ta(l) ? l.value = h : null),
|
|
1798
1800
|
modelModifiers: { trim: !0 },
|
|
1799
|
-
"fetch-suggestions": D(
|
|
1801
|
+
"fetch-suggestions": D(n),
|
|
1800
1802
|
placeholder: D(E)("请输入位置"),
|
|
1801
1803
|
style: { width: "100%" },
|
|
1802
1804
|
"trigger-on-focus": !1,
|