@das-fed/ui 7.0.7-hot.21 → 7.0.7-hot.22
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/ai-panel/{index-8yffh0Id.js → index-DMJXZM7n.js} +1067 -1056
- package/packages/business-components/ai-panel/index-DMJXZM7n.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-IzGl26KU.js → index-MqhMkLo9.js} +9 -9
- package/packages/business-components/ai-panel/index-MqhMkLo9.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-OwRrV6K8.js → index-_q72oKSF.js} +63 -62
- package/packages/business-components/ai-panel/index-_q72oKSF.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/device-panel/index.js +14908 -14808
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/echarts/index.js +2056 -2049
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/process-configuration/index.js +46 -46
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +99 -99
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-search-form/index.js +77 -77
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +215 -213
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +1104 -1096
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +243 -240
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +65 -64
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/autocomplete/index.js +12 -6
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/calendar/index.js +99 -99
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.js +2 -2
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/checkbox/index.js +30 -30
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +212 -212
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/dimple-layout/index.js +77 -75
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +25 -24
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +398 -397
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +47 -45
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form-item/index.js +67 -67
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/hls-player/index.js +14 -7
- package/packages/components/hls-player/index.js.gz +0 -0
- package/packages/components/image-upload/index.js +147 -143
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +297 -293
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/index.js +52 -52
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input-number/index.js +26 -26
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/live-player/index.js +251 -248
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/map/index.js +421 -415
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +1 -1
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/index.js +6 -6
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/popover/index.js +12 -12
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/radio-tabs/index.js +34 -34
- package/packages/components/radio-tabs/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +4613 -4583
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +135 -135
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +24 -24
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/select/index.js +60 -60
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select-list/index.js +9 -5
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +16 -14
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +53 -51
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/spin/index.js +33 -33
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.js +129 -128
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/table/index.js +179 -178
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/time-line/index.js +1 -1
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +1 -1
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-table/index.js +2 -2
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1117 -1093
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/business-components/ai-panel/index-8yffh0Id.js.gz +0 -0
- package/packages/business-components/ai-panel/index-IzGl26KU.js.gz +0 -0
- package/packages/business-components/ai-panel/index-OwRrV6K8.js.gz +0 -0
|
@@ -1,66 +1,68 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/map/style.css';
|
|
2
|
-
import { ref as S, defineComponent as Ae, shallowRef as H, computed as Se, onMounted as Oe, createElementBlock as Te, openBlock as $e, normalizeStyle as je, createElementVNode as W, withDirectives as Z, createVNode as de, withKeys as
|
|
3
|
-
import { withInstall as
|
|
2
|
+
import { ref as S, defineComponent as Ae, shallowRef as H, computed as Se, onMounted as Oe, createElementBlock as Te, openBlock as $e, normalizeStyle as je, createElementVNode as W, withDirectives as Z, createVNode as de, withKeys as Ee, unref as z, h as Qt, render as ea, isRef as ta, vShow as Ke, withCtx as aa, createTextVNode as oa, toDisplayString as ra } from "vue";
|
|
3
|
+
import { withInstall as Le } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { ElAutocomplete as Pe, ElLoadingDirective as ke } from "element-plus/es";
|
|
5
5
|
import "element-plus/es/components/base/style/css";
|
|
6
6
|
import "element-plus/es/components/loading/style/css";
|
|
7
7
|
import "element-plus/es/components/autocomplete/style/css";
|
|
8
|
-
import { t as
|
|
8
|
+
import { t as k, setI18nRule as na } from "@das-fed/web/packages/i18n/index";
|
|
9
9
|
import { vDasTooltip as Re } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
10
|
-
import { DasMessage as
|
|
11
|
-
import { createService as
|
|
10
|
+
import { DasMessage as N } from "@das-fed/ui/packages/components/message/index";
|
|
11
|
+
import { createService as it } from "@das-fed/utils/create-api-service";
|
|
12
12
|
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: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode:
|
|
16
|
+
}, st = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: d, addressInfo: v }, b) => {
|
|
17
17
|
const C = S();
|
|
18
18
|
let x;
|
|
19
|
-
const
|
|
19
|
+
const R = (O, g, p, w) => {
|
|
20
20
|
C.value = p, w && (x = w);
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
|
|
21
|
+
const $ = document.createElement("script");
|
|
22
|
+
if ($.src = `${location.protocol}//webapi.amap.com/maps?v=1.4.15&key=${O}&plugin=AMap.CitySearch&callback=onLoad`, g) {
|
|
23
|
+
const s = document.createElement("script");
|
|
24
|
+
s.innerHTML = `window._AMapSecurityConfig = {
|
|
25
25
|
securityJsCode: "${g}",
|
|
26
|
-
}`, document.head.appendChild(
|
|
26
|
+
}`, document.head.appendChild(s);
|
|
27
27
|
}
|
|
28
|
-
document.head.appendChild(
|
|
29
|
-
|
|
28
|
+
document.head.appendChild($), window.onLoad = () => {
|
|
29
|
+
E();
|
|
30
30
|
};
|
|
31
|
-
},
|
|
32
|
-
var
|
|
33
|
-
if (e.value = AMap,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
t.value = new AMap.Map("map", {
|
|
37
|
-
zoom: 15,
|
|
38
|
-
...p
|
|
39
|
-
});
|
|
40
|
-
} catch {
|
|
41
|
-
r.value = !1, z.error(P("thirdPartyMapErrorRetry"));
|
|
42
|
-
}
|
|
43
|
-
AMap.plugin(["AMap.ToolBar"], () => {
|
|
44
|
-
t.value.addControl(
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
new AMap.ToolBar({
|
|
47
|
-
// 简易缩放模式,默认为 false
|
|
48
|
-
liteStyle: !0
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
}), i(), (g = C.value) != null && g.clickStream || c(), r.value = !1, x && x();
|
|
31
|
+
}, E = () => {
|
|
32
|
+
var O, g;
|
|
33
|
+
if (e.value = AMap, console.log("AMap", e.value), typeof e.value > "u") {
|
|
34
|
+
console.log("AK值无效");
|
|
35
|
+
return;
|
|
52
36
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
try {
|
|
38
|
+
const p = ((O = C.value) == null ? void 0 : O.mapOpt) ?? {};
|
|
39
|
+
t.value = new AMap.Map("map", {
|
|
40
|
+
zoom: 15,
|
|
41
|
+
...p
|
|
42
|
+
});
|
|
43
|
+
} catch {
|
|
44
|
+
r.value = !1, N.error(k("thirdPartyMapErrorRetry"));
|
|
45
|
+
}
|
|
46
|
+
AMap.plugin(["AMap.ToolBar"], () => {
|
|
47
|
+
t.value.addControl(
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
new AMap.ToolBar({
|
|
50
|
+
// 简易缩放模式,默认为 false
|
|
51
|
+
liteStyle: !0
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
}), c(), (g = C.value) != null && g.clickStream || i(), r.value = !1, x && x();
|
|
55
|
+
}, i = () => {
|
|
56
|
+
t.value.on("click", (O) => {
|
|
57
|
+
a.value && t.value.remove(a.value), o.value = [O.lnglat.getLng(), O.lnglat.getLat()], h(o.value, !0).then(() => {
|
|
56
58
|
a.value = new AMap.Marker({
|
|
57
59
|
position: o.value,
|
|
58
60
|
title: n.value
|
|
59
|
-
}), t.value.add(a.value), t.value.setCenter(o.value);
|
|
61
|
+
}), t.value.add(a.value), t.value.setCenter(o.value), console.log("当前的地址坐标信息:", o.value, n.value);
|
|
60
62
|
});
|
|
61
63
|
});
|
|
62
|
-
},
|
|
63
|
-
!n.value && !o.value.length &&
|
|
64
|
+
}, c = async () => {
|
|
65
|
+
!n.value && !o.value.length && B(), 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, (O, g) => {
|
|
64
66
|
if (g && g.length) {
|
|
65
67
|
const p = g.find(
|
|
66
68
|
(w) => w.value === n.value || w.info.name === n.value
|
|
@@ -75,54 +77,54 @@ const Q = (e) => {
|
|
|
75
77
|
position: o.value,
|
|
76
78
|
title: n.value
|
|
77
79
|
}), t.value.add(a.value), o.value.length && t.value.setCenter(o.value);
|
|
78
|
-
}, h = (
|
|
79
|
-
const p =
|
|
80
|
-
return new Promise((w,
|
|
80
|
+
}, h = (O, g = !1) => {
|
|
81
|
+
const p = O.join(",");
|
|
82
|
+
return new Promise((w, $) => {
|
|
81
83
|
AMap.service("AMap.Geocoder", () => {
|
|
82
84
|
new AMap.Geocoder({
|
|
83
85
|
city: "全国"
|
|
84
|
-
}).getAddress(p, (f,
|
|
85
|
-
var M,
|
|
86
|
-
if (f === "complete" && (
|
|
86
|
+
}).getAddress(p, (f, m) => {
|
|
87
|
+
var M, y;
|
|
88
|
+
if (console.log(`${p}逆地址解析=======`, f, m), f === "complete" && (m != null && m.regeocode)) {
|
|
87
89
|
if (g) {
|
|
88
|
-
const { province:
|
|
89
|
-
n.value =
|
|
90
|
-
district:
|
|
90
|
+
const { province: T = "", city: G = "", district: L = "", township: ne = "" } = m.regeocode.addressComponent;
|
|
91
|
+
n.value = m.regeocode.formattedAddress ?? "", v.value = {
|
|
92
|
+
district: T + G + L,
|
|
91
93
|
address: ne,
|
|
92
|
-
name: n.value.replace(
|
|
94
|
+
name: n.value.replace(T, "").replace(G, "").replace(L, "").replace(ne, "")
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
|
-
|
|
97
|
+
d.value = ((y = (M = m.regeocode) == null ? void 0 : M.addressComponent) == null ? void 0 : y.adcode) ?? "", w(m.regeocode);
|
|
96
98
|
} else
|
|
97
|
-
|
|
99
|
+
N.error(k("thirdPartyMapErrorRetry")), $();
|
|
98
100
|
});
|
|
99
101
|
});
|
|
100
102
|
});
|
|
101
|
-
}, A = (
|
|
103
|
+
}, A = (O) => new Promise((g, p) => {
|
|
102
104
|
AMap.service("AMap.Geocoder", () => {
|
|
103
105
|
new AMap.Geocoder({
|
|
104
106
|
city: "全国"
|
|
105
|
-
}).getLocation(
|
|
106
|
-
var f,
|
|
107
|
-
if (
|
|
108
|
-
const M =
|
|
109
|
-
o.value[0] = M.lng, o.value[1] = M.lat,
|
|
107
|
+
}).getLocation(O, ($, s) => {
|
|
108
|
+
var f, m;
|
|
109
|
+
if (console.log(`${O}地址解析出经纬度=======`, $, s), $ === "complete" && ((f = s.geocodes) != null && f.length)) {
|
|
110
|
+
const M = s.geocodes[0].location;
|
|
111
|
+
o.value[0] = M.lng, o.value[1] = M.lat, d.value = ((m = s.geocodes[0]) == null ? void 0 : m.adcode) ?? "", g(s.geocodes[0].location);
|
|
110
112
|
} else
|
|
111
|
-
|
|
113
|
+
N.error(k("thirdPartyMapErrorRetry")), p();
|
|
112
114
|
});
|
|
113
115
|
});
|
|
114
|
-
}),
|
|
116
|
+
}), B = () => {
|
|
115
117
|
new AMap.CitySearch().getLocalCity((g, p) => {
|
|
116
|
-
if (g === "complete" && p.info === "OK") {
|
|
118
|
+
if (console.log("您当前所在城市:", g, p), g === "complete" && p.info === "OK") {
|
|
117
119
|
if (p && p.city && p.bounds) {
|
|
118
120
|
const w = p.bounds;
|
|
119
121
|
t.value.setBounds(w);
|
|
120
122
|
}
|
|
121
123
|
} else
|
|
122
|
-
|
|
124
|
+
N.error(k("thirdPartyMapErrorRetry"));
|
|
123
125
|
});
|
|
124
|
-
}, _ = (
|
|
125
|
-
if (u.value.activated = !0, !
|
|
126
|
+
}, _ = (O, g) => {
|
|
127
|
+
if (u.value.activated = !0, !O) {
|
|
126
128
|
l.value = [], g([]);
|
|
127
129
|
return;
|
|
128
130
|
}
|
|
@@ -130,19 +132,19 @@ const Q = (e) => {
|
|
|
130
132
|
var p = {
|
|
131
133
|
city: "全国"
|
|
132
134
|
}, w = new AMap.Autocomplete(p);
|
|
133
|
-
w.search(
|
|
134
|
-
if (l.value = [], !
|
|
135
|
-
let f =
|
|
135
|
+
w.search(O, function($, s) {
|
|
136
|
+
if (l.value = [], !s || !s.tips) return g([]);
|
|
137
|
+
let f = s.tips;
|
|
136
138
|
if (!f || !f.length) return g([]);
|
|
137
|
-
f = f.map((
|
|
138
|
-
const { district: M = "", address:
|
|
139
|
+
f = f.map((m) => {
|
|
140
|
+
const { district: M = "", address: y = "", name: T = "", location: G = "" } = m;
|
|
139
141
|
return {
|
|
140
|
-
value: M +
|
|
141
|
-
point:
|
|
142
|
+
value: M + y + T,
|
|
143
|
+
point: G,
|
|
142
144
|
info: {
|
|
143
145
|
district: M,
|
|
144
|
-
address:
|
|
145
|
-
name:
|
|
146
|
+
address: y,
|
|
147
|
+
name: T
|
|
146
148
|
}
|
|
147
149
|
};
|
|
148
150
|
}), l.value = f.length > 5 ? f.slice(0, 5) : f, g(l.value, f);
|
|
@@ -151,8 +153,8 @@ const Q = (e) => {
|
|
|
151
153
|
};
|
|
152
154
|
return {
|
|
153
155
|
getLocationByInputSearch: _,
|
|
154
|
-
handleSelectAddress: (
|
|
155
|
-
n.value =
|
|
156
|
+
handleSelectAddress: (O) => {
|
|
157
|
+
n.value = O.value, v.value = O.info, A(O.value).then((g) => {
|
|
156
158
|
o.value = [g.lng, g.lat], a.value && t.value.remove(a.value), a.value = new AMap.Marker({
|
|
157
159
|
position: o.value,
|
|
158
160
|
title: n.value
|
|
@@ -161,10 +163,10 @@ const Q = (e) => {
|
|
|
161
163
|
});
|
|
162
164
|
},
|
|
163
165
|
getLocationParse: async () => {
|
|
164
|
-
var
|
|
165
|
-
if (!l.value.length) return
|
|
166
|
-
if (n.value = l.value[0].value, !((
|
|
167
|
-
return
|
|
166
|
+
var O;
|
|
167
|
+
if (!l.value.length) return N.error(k("thirdPartyMapErrorRetry"));
|
|
168
|
+
if (console.log("检索列表:", l.value), n.value = l.value[0].value, !((O = l.value[0]) != null && O.point))
|
|
169
|
+
return N.error(k("thirdPartyMapErrorRetry"));
|
|
168
170
|
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
171
|
position: o.value,
|
|
170
172
|
title: n.value
|
|
@@ -174,14 +176,14 @@ const Q = (e) => {
|
|
|
174
176
|
getMapInfo: () => ({
|
|
175
177
|
longitude: o.value[0],
|
|
176
178
|
latitude: o.value[1],
|
|
177
|
-
adCode:
|
|
179
|
+
adCode: d.value,
|
|
178
180
|
address: n.value,
|
|
179
181
|
addressInfo: v.value
|
|
180
182
|
}),
|
|
181
|
-
loadJavascript:
|
|
183
|
+
loadJavascript: R
|
|
182
184
|
};
|
|
183
|
-
}, dt = "v1", ua =
|
|
184
|
-
var n, o,
|
|
185
|
+
}, dt = "v1", ua = it(`/api/tool/map/${dt}`), ca = it(`/api/system-config/${dt}`), ia = ua.get("/regeo"), sa = ca.get("/platform/map/list"), Ge = async (e) => {
|
|
186
|
+
var n, o, d, v, b;
|
|
185
187
|
const t = ["", "baidu", "gaode", "google"];
|
|
186
188
|
let a = null, [r, u] = await sa().run();
|
|
187
189
|
if (r)
|
|
@@ -196,7 +198,7 @@ const Q = (e) => {
|
|
|
196
198
|
secretK: (o = C[0]) == null ? void 0 : o.securityKey
|
|
197
199
|
};
|
|
198
200
|
} else (l == null ? void 0 : l.length) == 1 && (a = {
|
|
199
|
-
mapType: t[(
|
|
201
|
+
mapType: t[(d = l[0]) == null ? void 0 : d.serviceProvider],
|
|
200
202
|
akVal: (v = l[0]) == null ? void 0 : v.akValue,
|
|
201
203
|
secretK: (b = l[0]) == null ? void 0 : b.securityKey
|
|
202
204
|
});
|
|
@@ -214,42 +216,42 @@ const Q = (e) => {
|
|
|
214
216
|
dev: { type: Boolean }
|
|
215
217
|
},
|
|
216
218
|
setup(e, { expose: t }) {
|
|
217
|
-
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null),
|
|
219
|
+
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null), d = S([]), v = Se(() => ({
|
|
218
220
|
width: a.width ? Q(a.width) : "100%",
|
|
219
221
|
height: a.height ? Q(a.height) : "100%"
|
|
220
|
-
})), b = S(""), C = S([]), x = S(""),
|
|
222
|
+
})), b = S(""), C = S([]), x = S(""), R = S(), { getLocationByInputSearch: E, handleSelectAddress: i, getLocationParse: c, getMapInfo: h, loadJavascript: A } = st(
|
|
221
223
|
{
|
|
222
224
|
MapGL: r,
|
|
223
225
|
map: u,
|
|
224
226
|
marker: l,
|
|
225
227
|
mapLoading: n,
|
|
226
228
|
$autocomplete: o,
|
|
227
|
-
searchResultList:
|
|
229
|
+
searchResultList: d,
|
|
228
230
|
innerInput: b,
|
|
229
231
|
innerPoint: C,
|
|
230
232
|
adCode: x,
|
|
231
|
-
addressInfo:
|
|
233
|
+
addressInfo: R
|
|
232
234
|
}
|
|
233
|
-
),
|
|
235
|
+
), B = async () => {
|
|
234
236
|
const _ = {
|
|
235
237
|
akValue: a.akValue ?? "",
|
|
236
238
|
secretKey: a.secretKey ?? ""
|
|
237
239
|
};
|
|
238
240
|
{
|
|
239
|
-
const [
|
|
240
|
-
|
|
241
|
+
const [j, D] = await Ge("gaode");
|
|
242
|
+
j && N.error(k("获取地图配置信息失败")), !j && !D && N.error(k("暂未配置地图")), D && (_.akValue || (_.akValue = D.akVal), _.secretKey || (_.secretKey = D.secretK));
|
|
241
243
|
}
|
|
242
244
|
return _;
|
|
243
245
|
};
|
|
244
246
|
return Oe(async () => {
|
|
245
247
|
a.defaultLongitude && a.defaultLatitude && (C.value = [a.defaultLongitude, a.defaultLatitude]), b.value = a.defaultAddress ?? "";
|
|
246
|
-
const { akValue: _, secretKey:
|
|
247
|
-
A(_,
|
|
248
|
+
const { akValue: _, secretKey: j } = await B();
|
|
249
|
+
A(_, j);
|
|
248
250
|
}), t({
|
|
249
251
|
/** 获取经纬度、地址、行政区划编码 */
|
|
250
252
|
getMapInfo: h
|
|
251
|
-
}), (_,
|
|
252
|
-
const
|
|
253
|
+
}), (_, j) => {
|
|
254
|
+
const D = Pe, U = ke;
|
|
253
255
|
return $e(), Te(
|
|
254
256
|
"div",
|
|
255
257
|
{
|
|
@@ -258,20 +260,20 @@ const Q = (e) => {
|
|
|
258
260
|
},
|
|
259
261
|
[
|
|
260
262
|
W("div", da, [
|
|
261
|
-
Z(de(
|
|
263
|
+
Z(de(D, {
|
|
262
264
|
ref_key: "$autocomplete",
|
|
263
265
|
ref: o,
|
|
264
266
|
modelValue: b.value,
|
|
265
|
-
"onUpdate:modelValue":
|
|
266
|
-
"fetch-suggestions":
|
|
267
|
-
placeholder:
|
|
267
|
+
"onUpdate:modelValue": j[0] || (j[0] = (O) => b.value = O),
|
|
268
|
+
"fetch-suggestions": z(E),
|
|
269
|
+
placeholder: z(k)("请输入位置"),
|
|
268
270
|
style: { width: "100%" },
|
|
269
271
|
"trigger-on-focus": !1,
|
|
270
|
-
onSelect:
|
|
271
|
-
onKeyup:
|
|
272
|
+
onSelect: z(i),
|
|
273
|
+
onKeyup: Ee(z(c), ["enter", "native"]),
|
|
272
274
|
clearable: ""
|
|
273
275
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
274
|
-
[
|
|
276
|
+
[z(Re)]
|
|
275
277
|
])
|
|
276
278
|
]),
|
|
277
279
|
Z(W(
|
|
@@ -299,22 +301,22 @@ const Q = (e) => {
|
|
|
299
301
|
for (const [r, u] of t)
|
|
300
302
|
a[r] = u;
|
|
301
303
|
return a;
|
|
302
|
-
}, ga = /* @__PURE__ */ Be(va, [["__scopeId", "data-v-95b9bcca"]]), ft = ({ BMap: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode:
|
|
304
|
+
}, ga = /* @__PURE__ */ Be(va, [["__scopeId", "data-v-95b9bcca"]]), ft = ({ BMap: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: d, addressInfo: v }, b) => {
|
|
303
305
|
const C = S();
|
|
304
306
|
let x;
|
|
305
|
-
const
|
|
307
|
+
const R = (g, p, w) => {
|
|
306
308
|
C.value = p, w && (x = w);
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}, document.body.append(
|
|
311
|
-
},
|
|
309
|
+
const $ = document.createElement("script");
|
|
310
|
+
$.src = `${location.protocol}//api.map.baidu.com/getscript?type=webgl&v=3.0&ak=${g}&services=&t=20200109192240`, $.onload = () => {
|
|
311
|
+
E();
|
|
312
|
+
}, document.body.append($);
|
|
313
|
+
}, E = () => {
|
|
312
314
|
var p, w;
|
|
313
315
|
e.value = window.BMapGL;
|
|
314
316
|
try {
|
|
315
317
|
t.value = new e.value.Map("map", ((p = C.value) == null ? void 0 : p.mapOpt) ?? {});
|
|
316
318
|
} catch {
|
|
317
|
-
r.value = !1,
|
|
319
|
+
r.value = !1, N.error(k("thirdPartyMapErrorRetry"));
|
|
318
320
|
}
|
|
319
321
|
const g = new e.value.NavigationControl({
|
|
320
322
|
// @ts-ignore
|
|
@@ -322,16 +324,16 @@ const Q = (e) => {
|
|
|
322
324
|
// @ts-ignore
|
|
323
325
|
type: BMAP_NAVIGATION_CONTROL_ZOOM
|
|
324
326
|
});
|
|
325
|
-
t.value.addControl(g), t.value.enableScrollWheelZoom(!0),
|
|
326
|
-
},
|
|
327
|
-
new e.value.Geocoder().getPoint(g, (
|
|
328
|
-
!
|
|
327
|
+
t.value.addControl(g), t.value.enableScrollWheelZoom(!0), c(), (w = C.value) != null && w.clickStream || h(), r.value = !1, x && x();
|
|
328
|
+
}, i = (g) => new Promise((p, w) => {
|
|
329
|
+
new e.value.Geocoder().getPoint(g, (s) => {
|
|
330
|
+
console.log(`${g}地址解析=======`, s), !s || JSON.stringify(s) == "{}" ? (N.error(k("thirdPartyMapErrorRetry")), w()) : (console.log("当前的地址信息:", s), o.value[0] = s.lng, o.value[1] = s.lat, p(s));
|
|
329
331
|
});
|
|
330
|
-
}),
|
|
331
|
-
!n.value && !o.value.length &&
|
|
332
|
+
}), c = async () => {
|
|
333
|
+
!n.value && !o.value.length && B(), n.value && o.value.length > 0 ? await A(o.value[0], o.value[1]) : n.value ? await i(n.value) : o.value.length > 0 && await A(o.value[0], o.value[1], !0), n.value && _(n.value, (g, p) => {
|
|
332
334
|
if (p && p.length) {
|
|
333
335
|
const w = p.find(
|
|
334
|
-
(
|
|
336
|
+
($) => $.value === n.value || $.info.name === n.value
|
|
335
337
|
);
|
|
336
338
|
w ? v.value = w.info : v.value = {
|
|
337
339
|
province: "",
|
|
@@ -347,28 +349,28 @@ const Q = (e) => {
|
|
|
347
349
|
const p = g.latlng.lng, w = g.latlng.lat;
|
|
348
350
|
o.value = [p, w], A(p, w, !0);
|
|
349
351
|
});
|
|
350
|
-
}, A = (g, p, w = !1,
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
if (w) {
|
|
354
|
-
n.value =
|
|
355
|
-
const { province:
|
|
352
|
+
}, A = (g, p, w = !1, $ = "default") => new Promise((s, f) => {
|
|
353
|
+
const m = new e.value.Geocoder(), M = new e.value.Point(g, p);
|
|
354
|
+
m.getLocation(M, (y) => {
|
|
355
|
+
if (console.log("逆地址解析=======", y), w) {
|
|
356
|
+
n.value = y.address;
|
|
357
|
+
const { province: T = "", city: G = "", district: L = "" } = y.addressComponents;
|
|
356
358
|
v.value = {
|
|
357
|
-
province:
|
|
358
|
-
city:
|
|
359
|
-
address:
|
|
360
|
-
name:
|
|
359
|
+
province: T,
|
|
360
|
+
city: G,
|
|
361
|
+
address: G + L,
|
|
362
|
+
name: y.address.replace(T, "").replace(G, "").replace(L, "")
|
|
361
363
|
};
|
|
362
364
|
}
|
|
363
|
-
|
|
365
|
+
y && y.address ? ($ == "default" && (o.value[0] = y.point.lng, o.value[1] = y.point.lat, console.log("当前的地址坐标信息:", y, o.value), a.value && t.value.clearOverlays(), a.value = new e.value.Marker(M, { title: n.value }), t.value.addOverlay(a.value), t.value.centerAndZoom(M, 16)), U(g, p), s(y.address)) : (N.error(k("thirdPartyMapErrorRetry")), f());
|
|
364
366
|
});
|
|
365
|
-
}),
|
|
367
|
+
}), B = () => {
|
|
366
368
|
new e.value.LocalCity().get((p) => {
|
|
367
369
|
const w = p.center;
|
|
368
|
-
if (!p.center) return
|
|
370
|
+
if (console.log("您当前所在城市:", p.center), !p.center) return N.error(k("thirdPartyMapErrorRetry"));
|
|
369
371
|
a.value && t.value.clearOverlays();
|
|
370
|
-
const
|
|
371
|
-
t.value.centerAndZoom(
|
|
372
|
+
const $ = new e.value.Point(w.lng, w.lat);
|
|
373
|
+
t.value.centerAndZoom($, 13);
|
|
372
374
|
});
|
|
373
375
|
}, _ = (g, p) => {
|
|
374
376
|
if (u.value.activated = !0, l.value = [], !g) {
|
|
@@ -376,51 +378,51 @@ const Q = (e) => {
|
|
|
376
378
|
return;
|
|
377
379
|
}
|
|
378
380
|
new e.value.LocalSearch(t.value, {
|
|
379
|
-
onSearchComplete: (
|
|
380
|
-
let
|
|
381
|
-
for (let f = 0; f <
|
|
382
|
-
|
|
383
|
-
if (!
|
|
384
|
-
|
|
385
|
-
const { address:
|
|
381
|
+
onSearchComplete: ($) => {
|
|
382
|
+
let s = [];
|
|
383
|
+
for (let f = 0; f < $.getCurrentNumPois(); f++)
|
|
384
|
+
s.push($.getPoi(f));
|
|
385
|
+
if (!s.length) return p([]);
|
|
386
|
+
s = s.map((f) => {
|
|
387
|
+
const { address: m = "", title: M = "", province: y = "", city: T = "", point: G = {} } = f;
|
|
386
388
|
return {
|
|
387
|
-
value:
|
|
388
|
-
point:
|
|
389
|
+
value: m == M ? m : m + M,
|
|
390
|
+
point: G,
|
|
389
391
|
info: {
|
|
390
|
-
province:
|
|
391
|
-
city:
|
|
392
|
-
address:
|
|
392
|
+
province: y,
|
|
393
|
+
city: T,
|
|
394
|
+
address: m,
|
|
393
395
|
name: M
|
|
394
396
|
}
|
|
395
397
|
};
|
|
396
|
-
}), l.value =
|
|
398
|
+
}), l.value = s.length > 5 ? s.slice(0, 5) : s, p(l.value, s);
|
|
397
399
|
}
|
|
398
400
|
}).search(g);
|
|
399
|
-
},
|
|
401
|
+
}, j = (g) => {
|
|
400
402
|
var p, w;
|
|
401
403
|
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);
|
|
402
|
-
},
|
|
404
|
+
}, D = () => {
|
|
403
405
|
var g;
|
|
404
|
-
if (!l.value.length) return
|
|
405
|
-
if (n.value = l.value[0].value, v.value = l.value[0].info, !((g = l.value[0]) != null && g.point))
|
|
406
|
-
return
|
|
406
|
+
if (!l.value.length) return N.error(k("thirdPartyMapErrorRetry"));
|
|
407
|
+
if (console.log("检索列表:", l.value), n.value = l.value[0].value, v.value = l.value[0].info, !((g = l.value[0]) != null && g.point))
|
|
408
|
+
return N.error(k("thirdPartyMapErrorRetry"));
|
|
407
409
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], A(o.value[0], o.value[1]), u.value.activated = !1;
|
|
408
410
|
}, U = async (g, p) => {
|
|
409
|
-
const [w,
|
|
410
|
-
w || (
|
|
411
|
+
const [w, $] = await ia().run({ longitude: g, latitude: p });
|
|
412
|
+
w || (d.value = $.areaCode);
|
|
411
413
|
};
|
|
412
414
|
return {
|
|
413
415
|
getLocationByInputSearch: _,
|
|
414
|
-
handleSelectAddress:
|
|
415
|
-
getLocationParse:
|
|
416
|
+
handleSelectAddress: j,
|
|
417
|
+
getLocationParse: D,
|
|
416
418
|
getMapInfo: () => ({
|
|
417
419
|
longitude: o.value[0],
|
|
418
420
|
latitude: o.value[1],
|
|
419
|
-
adCode:
|
|
421
|
+
adCode: d.value,
|
|
420
422
|
address: n.value,
|
|
421
423
|
addressInfo: v.value
|
|
422
424
|
}),
|
|
423
|
-
loadJavascript:
|
|
425
|
+
loadJavascript: R
|
|
424
426
|
};
|
|
425
427
|
}, pa = { class: "search-input" }, ha = { id: "map" }, ya = /* @__PURE__ */ Ae({
|
|
426
428
|
__name: "baiduMap",
|
|
@@ -435,36 +437,36 @@ const Q = (e) => {
|
|
|
435
437
|
dev: { type: Boolean }
|
|
436
438
|
},
|
|
437
439
|
setup(e, { expose: t }) {
|
|
438
|
-
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null),
|
|
440
|
+
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null), d = S([]), v = Se(() => ({
|
|
439
441
|
width: a.width ? Q(a.width) : "100%",
|
|
440
442
|
height: a.height ? Q(a.height) : "100%"
|
|
441
|
-
})), b = S(""), C = S([]), x = S(""),
|
|
443
|
+
})), b = S(""), C = S([]), x = S(""), R = S(), { getLocationByInputSearch: E, handleSelectAddress: i, getLocationParse: c, getMapInfo: h, loadJavascript: A } = ft(
|
|
442
444
|
{
|
|
443
445
|
BMap: r,
|
|
444
446
|
map: u,
|
|
445
447
|
marker: l,
|
|
446
448
|
mapLoading: n,
|
|
447
449
|
$autocomplete: o,
|
|
448
|
-
searchResultList:
|
|
450
|
+
searchResultList: d,
|
|
449
451
|
innerInput: b,
|
|
450
452
|
innerPoint: C,
|
|
451
453
|
adCode: x,
|
|
452
|
-
addressInfo:
|
|
454
|
+
addressInfo: R
|
|
453
455
|
}
|
|
454
|
-
),
|
|
456
|
+
), B = async () => {
|
|
455
457
|
if (a.akValue) return a.akValue;
|
|
456
|
-
const [_,
|
|
457
|
-
return _ ? (
|
|
458
|
+
const [_, j] = await Ge("baidu");
|
|
459
|
+
return _ ? (N.error(k("获取地图配置信息失败")), "") : !_ && !j ? (N.error(k("暂未配置地图")), "") : j.akVal;
|
|
458
460
|
};
|
|
459
461
|
return Oe(async () => {
|
|
460
462
|
a.defaultLongitude && a.defaultLatitude && (C.value = [a.defaultLongitude, a.defaultLatitude]), b.value = a.defaultAddress ?? "";
|
|
461
|
-
const _ = await
|
|
463
|
+
const _ = await B();
|
|
462
464
|
A(_);
|
|
463
465
|
}), t({
|
|
464
466
|
// 获取经纬度、地址、行政区划信息
|
|
465
467
|
getMapInfo: h
|
|
466
|
-
}), (_,
|
|
467
|
-
const
|
|
468
|
+
}), (_, j) => {
|
|
469
|
+
const D = Pe, U = ke;
|
|
468
470
|
return $e(), Te(
|
|
469
471
|
"div",
|
|
470
472
|
{
|
|
@@ -473,20 +475,20 @@ const Q = (e) => {
|
|
|
473
475
|
},
|
|
474
476
|
[
|
|
475
477
|
W("div", pa, [
|
|
476
|
-
Z(de(
|
|
478
|
+
Z(de(D, {
|
|
477
479
|
ref_key: "$autocomplete",
|
|
478
480
|
ref: o,
|
|
479
481
|
modelValue: b.value,
|
|
480
|
-
"onUpdate:modelValue":
|
|
481
|
-
"fetch-suggestions":
|
|
482
|
-
placeholder:
|
|
482
|
+
"onUpdate:modelValue": j[0] || (j[0] = (O) => b.value = O),
|
|
483
|
+
"fetch-suggestions": z(E),
|
|
484
|
+
placeholder: z(k)("请输入位置"),
|
|
483
485
|
style: { width: "100%" },
|
|
484
486
|
"trigger-on-focus": !1,
|
|
485
|
-
onSelect:
|
|
486
|
-
onKeyup:
|
|
487
|
+
onSelect: z(i),
|
|
488
|
+
onKeyup: Ee(z(c), ["enter", "native"]),
|
|
487
489
|
clearable: ""
|
|
488
490
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
489
|
-
[
|
|
491
|
+
[z(Re)]
|
|
490
492
|
])
|
|
491
493
|
]),
|
|
492
494
|
Z(W(
|
|
@@ -566,15 +568,15 @@ function Ta(e) {
|
|
|
566
568
|
function $a(e) {
|
|
567
569
|
return this.__data__.has(e);
|
|
568
570
|
}
|
|
569
|
-
var vt = typeof global == "object" && global && global.Object === Object && global, ja = typeof self == "object" && self && self.Object === Object && self, te = vt || ja || Function("return this")(), ee = te.Symbol, gt = Object.prototype,
|
|
571
|
+
var vt = typeof global == "object" && global && global.Object === Object && global, ja = typeof self == "object" && self && self.Object === Object && self, te = vt || ja || Function("return this")(), ee = te.Symbol, gt = Object.prototype, Ea = gt.hasOwnProperty, La = gt.toString, ue = ee ? ee.toStringTag : void 0;
|
|
570
572
|
function Pa(e) {
|
|
571
|
-
var t =
|
|
573
|
+
var t = Ea.call(e, ue), a = e[ue];
|
|
572
574
|
try {
|
|
573
575
|
e[ue] = void 0;
|
|
574
576
|
var r = !0;
|
|
575
577
|
} catch {
|
|
576
578
|
}
|
|
577
|
-
var u =
|
|
579
|
+
var u = La.call(e);
|
|
578
580
|
return r && (t ? e[ue] = a : delete e[ue]), u;
|
|
579
581
|
}
|
|
580
582
|
var ka = Object.prototype, Ra = ka.toString;
|
|
@@ -633,9 +635,9 @@ function ze(e, t) {
|
|
|
633
635
|
var a = to(e, t);
|
|
634
636
|
return eo(a) ? a : void 0;
|
|
635
637
|
}
|
|
636
|
-
var pt = ze(te, "Map"),
|
|
638
|
+
var pt = ze(te, "Map"), ie = ze(Object, "create");
|
|
637
639
|
function ao() {
|
|
638
|
-
this.__data__ =
|
|
640
|
+
this.__data__ = ie ? ie(null) : {}, this.size = 0;
|
|
639
641
|
}
|
|
640
642
|
function oo(e) {
|
|
641
643
|
var t = this.has(e) && delete this.__data__[e];
|
|
@@ -644,21 +646,21 @@ function oo(e) {
|
|
|
644
646
|
var ro = "__lodash_hash_undefined__", no = Object.prototype, lo = no.hasOwnProperty;
|
|
645
647
|
function uo(e) {
|
|
646
648
|
var t = this.__data__;
|
|
647
|
-
if (
|
|
649
|
+
if (ie) {
|
|
648
650
|
var a = t[e];
|
|
649
651
|
return a === ro ? void 0 : a;
|
|
650
652
|
}
|
|
651
653
|
return lo.call(t, e) ? t[e] : void 0;
|
|
652
654
|
}
|
|
653
|
-
var
|
|
655
|
+
var co = Object.prototype, io = co.hasOwnProperty;
|
|
654
656
|
function so(e) {
|
|
655
657
|
var t = this.__data__;
|
|
656
|
-
return
|
|
658
|
+
return ie ? t[e] !== void 0 : io.call(t, e);
|
|
657
659
|
}
|
|
658
660
|
var fo = "__lodash_hash_undefined__";
|
|
659
661
|
function vo(e, t) {
|
|
660
662
|
var a = this.__data__;
|
|
661
|
-
return this.size += this.has(e) ? 0 : 1, a[e] =
|
|
663
|
+
return this.size += this.has(e) ? 0 : 1, a[e] = ie && t === void 0 ? fo : t, this;
|
|
662
664
|
}
|
|
663
665
|
function q(e) {
|
|
664
666
|
var t = -1, a = e == null ? 0 : e.length;
|
|
@@ -754,8 +756,8 @@ function _e(e, t, a) {
|
|
|
754
756
|
function xo(e) {
|
|
755
757
|
return function(t, a, r) {
|
|
756
758
|
for (var u = -1, l = Object(t), n = r(t), o = n.length; o--; ) {
|
|
757
|
-
var
|
|
758
|
-
if (a(l[
|
|
759
|
+
var d = n[++u];
|
|
760
|
+
if (a(l[d], d, l) === !1)
|
|
759
761
|
break;
|
|
760
762
|
}
|
|
761
763
|
return t;
|
|
@@ -799,12 +801,12 @@ function jo(e, t) {
|
|
|
799
801
|
return e(t(a));
|
|
800
802
|
};
|
|
801
803
|
}
|
|
802
|
-
var yt = jo(Object.getPrototypeOf, Object),
|
|
804
|
+
var yt = jo(Object.getPrototypeOf, Object), Eo = Object.prototype;
|
|
803
805
|
function mt(e) {
|
|
804
|
-
var t = e && e.constructor, a = typeof t == "function" && t.prototype ||
|
|
806
|
+
var t = e && e.constructor, a = typeof t == "function" && t.prototype || Eo;
|
|
805
807
|
return e === a;
|
|
806
808
|
}
|
|
807
|
-
function
|
|
809
|
+
function Lo(e) {
|
|
808
810
|
return typeof e.constructor == "function" && !mt(e) ? $o(yt(e)) : {};
|
|
809
811
|
}
|
|
810
812
|
function re(e) {
|
|
@@ -841,20 +843,20 @@ function Io(e) {
|
|
|
841
843
|
var a = Fo.call(t, "constructor") && t.constructor;
|
|
842
844
|
return typeof a == "function" && a instanceof a && Mt.call(a) == Ho;
|
|
843
845
|
}
|
|
844
|
-
var Jo = "[object Arguments]", Zo = "[object Array]", Wo = "[object Boolean]", qo = "[object Date]", Yo = "[object Error]", Xo = "[object Function]", Qo = "[object Map]", er = "[object Number]", tr = "[object Object]", ar = "[object RegExp]", or = "[object Set]", rr = "[object String]", nr = "[object WeakMap]", lr = "[object ArrayBuffer]", ur = "[object DataView]",
|
|
845
|
-
|
|
846
|
-
|
|
846
|
+
var Jo = "[object Arguments]", Zo = "[object Array]", Wo = "[object Boolean]", qo = "[object Date]", Yo = "[object Error]", Xo = "[object Function]", Qo = "[object Map]", er = "[object Number]", tr = "[object Object]", ar = "[object RegExp]", or = "[object Set]", rr = "[object String]", nr = "[object WeakMap]", lr = "[object ArrayBuffer]", ur = "[object DataView]", cr = "[object Float32Array]", ir = "[object Float64Array]", sr = "[object Int8Array]", dr = "[object Int16Array]", fr = "[object Int32Array]", vr = "[object Uint8Array]", gr = "[object Uint8ClampedArray]", pr = "[object Uint16Array]", hr = "[object Uint32Array]", P = {};
|
|
847
|
+
P[cr] = P[ir] = P[sr] = P[dr] = P[fr] = P[vr] = P[gr] = P[pr] = P[hr] = !0;
|
|
848
|
+
P[Jo] = P[Zo] = P[lr] = P[Wo] = P[ur] = P[qo] = P[Yo] = P[Xo] = P[Qo] = P[er] = P[tr] = P[ar] = P[or] = P[rr] = P[nr] = !1;
|
|
847
849
|
function yr(e) {
|
|
848
|
-
return re(e) && _t(e.length) && !!
|
|
850
|
+
return re(e) && _t(e.length) && !!P[se(e)];
|
|
849
851
|
}
|
|
850
852
|
function mr(e) {
|
|
851
853
|
return function(t) {
|
|
852
854
|
return e(t);
|
|
853
855
|
};
|
|
854
856
|
}
|
|
855
|
-
var Ct = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
857
|
+
var Ct = typeof exports == "object" && exports && !exports.nodeType && exports, ce = Ct && typeof module == "object" && module && !module.nodeType && module, br = ce && ce.exports === Ct, be = br && vt.process, Qe = function() {
|
|
856
858
|
try {
|
|
857
|
-
var e =
|
|
859
|
+
var e = ce && ce.require && ce.require("util").types;
|
|
858
860
|
return e || be && be.binding && be.binding("util");
|
|
859
861
|
} catch {
|
|
860
862
|
}
|
|
@@ -872,8 +874,8 @@ function Mr(e, t, a, r) {
|
|
|
872
874
|
var u = !a;
|
|
873
875
|
a || (a = {});
|
|
874
876
|
for (var l = -1, n = t.length; ++l < n; ) {
|
|
875
|
-
var o = t[l],
|
|
876
|
-
|
|
877
|
+
var o = t[l], d = void 0;
|
|
878
|
+
d === void 0 && (d = e[o]), u ? Ne(a, o, d) : xr(a, o, d);
|
|
877
879
|
}
|
|
878
880
|
return a;
|
|
879
881
|
}
|
|
@@ -888,13 +890,13 @@ function St(e, t) {
|
|
|
888
890
|
return t = t ?? Ar, !!t && (a == "number" || a != "symbol" && Sr.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
889
891
|
}
|
|
890
892
|
function Or(e, t) {
|
|
891
|
-
var a = ve(e), r = !a && we(e), u = !a && !r && xt(e), l = !a && !r && !u && At(e), n = a || r || u || l, o = n ? Cr(e.length, String) : [],
|
|
893
|
+
var a = ve(e), r = !a && we(e), u = !a && !r && xt(e), l = !a && !r && !u && At(e), n = a || r || u || l, o = n ? Cr(e.length, String) : [], d = o.length;
|
|
892
894
|
for (var v in e)
|
|
893
895
|
n && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
894
896
|
(v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
895
897
|
u && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
896
898
|
l && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
|
|
897
|
-
St(v,
|
|
899
|
+
St(v, d)) || o.push(v);
|
|
898
900
|
return o;
|
|
899
901
|
}
|
|
900
902
|
function Tr(e) {
|
|
@@ -905,7 +907,7 @@ function Tr(e) {
|
|
|
905
907
|
return t;
|
|
906
908
|
}
|
|
907
909
|
var $r = Object.prototype, jr = $r.hasOwnProperty;
|
|
908
|
-
function
|
|
910
|
+
function Er(e) {
|
|
909
911
|
if (!Y(e))
|
|
910
912
|
return Tr(e);
|
|
911
913
|
var t = mt(e), a = [];
|
|
@@ -914,23 +916,23 @@ function Lr(e) {
|
|
|
914
916
|
return a;
|
|
915
917
|
}
|
|
916
918
|
function Ot(e) {
|
|
917
|
-
return Ue(e) ? Or(e) :
|
|
919
|
+
return Ue(e) ? Or(e) : Er(e);
|
|
918
920
|
}
|
|
919
|
-
function
|
|
921
|
+
function Lr(e) {
|
|
920
922
|
return Mr(e, Ot(e));
|
|
921
923
|
}
|
|
922
924
|
function Pr(e, t, a, r, u, l, n) {
|
|
923
|
-
var o = xe(e, a),
|
|
925
|
+
var o = xe(e, a), d = xe(t, a), v = n.get(d);
|
|
924
926
|
if (v) {
|
|
925
927
|
_e(e, a, v);
|
|
926
928
|
return;
|
|
927
929
|
}
|
|
928
|
-
var b = l ? l(o,
|
|
930
|
+
var b = l ? l(o, d, a + "", e, t, n) : void 0, C = b === void 0;
|
|
929
931
|
if (C) {
|
|
930
|
-
var x = ve(
|
|
931
|
-
b =
|
|
932
|
+
var x = ve(d), R = !x && xt(d), E = !x && !R && At(d);
|
|
933
|
+
b = d, x || R || E ? ve(o) ? b = o : Bo(o) ? b = To(o) : R ? (C = !1, b = Ao(d)) : E ? (C = !1, b = Oo(d)) : b = [] : Io(d) || we(d) ? (b = o, we(o) ? b = Lr(o) : (!Y(o) || De(o)) && (b = Lo(d))) : C = !1;
|
|
932
934
|
}
|
|
933
|
-
C && (n.set(
|
|
935
|
+
C && (n.set(d, b), u(b, d, r, l, n), n.delete(d)), _e(e, a, b);
|
|
934
936
|
}
|
|
935
937
|
function Tt(e, t, a, r, u) {
|
|
936
938
|
e !== t && Mo(t, function(l, n) {
|
|
@@ -1025,64 +1027,64 @@ var jt = { exports: {} };
|
|
|
1025
1027
|
(function(t, a) {
|
|
1026
1028
|
e.exports ? e.exports = a() : t.coordtransform = a();
|
|
1027
1029
|
})(Jr, function() {
|
|
1028
|
-
var t = 52.35987755982988, a = 3.141592653589793, r = 6378245, u = 0.006693421622965943, l = function(
|
|
1029
|
-
var
|
|
1030
|
-
return [
|
|
1031
|
-
}, n = function(
|
|
1032
|
-
var
|
|
1033
|
-
return [
|
|
1034
|
-
}, o = function(
|
|
1035
|
-
var
|
|
1036
|
-
if (C(
|
|
1037
|
-
return [
|
|
1038
|
-
var h = v(
|
|
1030
|
+
var t = 52.35987755982988, a = 3.141592653589793, r = 6378245, u = 0.006693421622965943, l = function(i, c) {
|
|
1031
|
+
var i = +i, c = +c, h = i - 65e-4, A = c - 6e-3, B = Math.sqrt(h * h + A * A) - 2e-5 * Math.sin(A * t), _ = Math.atan2(A, h) - 3e-6 * Math.cos(h * t), j = B * Math.cos(_), D = B * Math.sin(_);
|
|
1032
|
+
return [j, D];
|
|
1033
|
+
}, n = function(c, i) {
|
|
1034
|
+
var i = +i, c = +c, h = Math.sqrt(c * c + i * i) + 2e-5 * Math.sin(i * t), A = Math.atan2(i, c) + 3e-6 * Math.cos(c * t), B = h * Math.cos(A) + 65e-4, _ = h * Math.sin(A) + 6e-3;
|
|
1035
|
+
return [B, _];
|
|
1036
|
+
}, o = function(c, i) {
|
|
1037
|
+
var i = +i, c = +c;
|
|
1038
|
+
if (C(c, i))
|
|
1039
|
+
return [c, i];
|
|
1040
|
+
var h = v(c - 105, i - 35), A = b(c - 105, i - 35), B = i / 180 * a, _ = Math.sin(B);
|
|
1039
1041
|
_ = 1 - u * _ * _;
|
|
1040
|
-
var
|
|
1041
|
-
h = h * 180 / (r * (1 - u) / (_ *
|
|
1042
|
-
var
|
|
1043
|
-
return [U,
|
|
1044
|
-
},
|
|
1045
|
-
var
|
|
1046
|
-
if (C(
|
|
1047
|
-
return [
|
|
1048
|
-
var h = v(
|
|
1042
|
+
var j = Math.sqrt(_);
|
|
1043
|
+
h = h * 180 / (r * (1 - u) / (_ * j) * a), A = A * 180 / (r / j * Math.cos(B) * a);
|
|
1044
|
+
var D = i + h, U = c + A;
|
|
1045
|
+
return [U, D];
|
|
1046
|
+
}, d = function(c, i) {
|
|
1047
|
+
var i = +i, c = +c;
|
|
1048
|
+
if (C(c, i))
|
|
1049
|
+
return [c, i];
|
|
1050
|
+
var h = v(c - 105, i - 35), A = b(c - 105, i - 35), B = i / 180 * a, _ = Math.sin(B);
|
|
1049
1051
|
_ = 1 - u * _ * _;
|
|
1050
|
-
var
|
|
1051
|
-
h = h * 180 / (r * (1 - u) / (_ *
|
|
1052
|
-
var
|
|
1053
|
-
return [
|
|
1054
|
-
}, v = function(
|
|
1055
|
-
var
|
|
1056
|
-
return h += (20 * Math.sin(6 *
|
|
1057
|
-
}, b = function(
|
|
1058
|
-
var
|
|
1059
|
-
return h += (20 * Math.sin(6 *
|
|
1060
|
-
}, C = function(
|
|
1061
|
-
var
|
|
1062
|
-
return !(
|
|
1052
|
+
var j = Math.sqrt(_);
|
|
1053
|
+
h = h * 180 / (r * (1 - u) / (_ * j) * a), A = A * 180 / (r / j * Math.cos(B) * a);
|
|
1054
|
+
var D = i + h, U = c + A;
|
|
1055
|
+
return [c * 2 - U, i * 2 - D];
|
|
1056
|
+
}, v = function(c, i) {
|
|
1057
|
+
var i = +i, c = +c, h = -100 + 2 * c + 3 * i + 0.2 * i * i + 0.1 * c * i + 0.2 * Math.sqrt(Math.abs(c));
|
|
1058
|
+
return h += (20 * Math.sin(6 * c * a) + 20 * Math.sin(2 * c * a)) * 2 / 3, h += (20 * Math.sin(i * a) + 40 * Math.sin(i / 3 * a)) * 2 / 3, h += (160 * Math.sin(i / 12 * a) + 320 * Math.sin(i * a / 30)) * 2 / 3, h;
|
|
1059
|
+
}, b = function(c, i) {
|
|
1060
|
+
var i = +i, c = +c, h = 300 + c + 2 * i + 0.1 * c * c + 0.1 * c * i + 0.1 * Math.sqrt(Math.abs(c));
|
|
1061
|
+
return h += (20 * Math.sin(6 * c * a) + 20 * Math.sin(2 * c * a)) * 2 / 3, h += (20 * Math.sin(c * a) + 40 * Math.sin(c / 3 * a)) * 2 / 3, h += (150 * Math.sin(c / 12 * a) + 300 * Math.sin(c / 30 * a)) * 2 / 3, h;
|
|
1062
|
+
}, C = function(c, i) {
|
|
1063
|
+
var i = +i, c = +c;
|
|
1064
|
+
return !(c > 73.66 && c < 135.05 && i > 3.86 && i < 53.55);
|
|
1063
1065
|
};
|
|
1064
1066
|
return {
|
|
1065
1067
|
bd09togcj02: l,
|
|
1066
1068
|
gcj02tobd09: n,
|
|
1067
1069
|
wgs84togcj02: o,
|
|
1068
|
-
gcj02towgs84:
|
|
1070
|
+
gcj02towgs84: d
|
|
1069
1071
|
};
|
|
1070
1072
|
});
|
|
1071
1073
|
})(jt);
|
|
1072
1074
|
var Wr = jt.exports;
|
|
1073
|
-
const
|
|
1075
|
+
const Et = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) => {
|
|
1074
1076
|
const l = (n, o) => {
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1077
|
+
const d = document.createElement("div");
|
|
1078
|
+
d.style.cursor = "pointer";
|
|
1077
1079
|
const v = Qt(n, o);
|
|
1078
|
-
return ea(v,
|
|
1080
|
+
return ea(v, d), d;
|
|
1079
1081
|
};
|
|
1080
1082
|
e.addCustomComponent = (n) => {
|
|
1081
1083
|
!Array.isArray(n) || (n == null ? void 0 : n.length) === 0 || n.forEach((o) => {
|
|
1082
|
-
const { component:
|
|
1084
|
+
const { component: d, componentProps: v, lng: b, lat: C, markerOptions: x = {} } = o, R = typeof v == "function" ? v() : v, E = typeof d == "function" ? d() : d, i = () => l(E, R);
|
|
1083
1085
|
if (a.value === "baidu") {
|
|
1084
|
-
const
|
|
1085
|
-
point: { lng:
|
|
1086
|
+
const c = Et.gcj02tobd09(b, C), h = new r.value.CustomOverlay(i, {
|
|
1087
|
+
point: { lng: c[0], lat: c[1] },
|
|
1086
1088
|
...x
|
|
1087
1089
|
});
|
|
1088
1090
|
u.value.addOverlay(h), h.addEventListener("click", function(A) {
|
|
@@ -1090,7 +1092,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1090
1092
|
});
|
|
1091
1093
|
}
|
|
1092
1094
|
if (a.value === "gaode") {
|
|
1093
|
-
const
|
|
1095
|
+
const c = l(E, R), h = new r.value.Marker({ content: c, position: [b, C], ...x });
|
|
1094
1096
|
u.value.add(h), r.value.event.addListener(h, "click", function(A) {
|
|
1095
1097
|
t("click-custom-component", o, A);
|
|
1096
1098
|
});
|
|
@@ -1100,16 +1102,16 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1100
1102
|
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1101
1103
|
__proto__: null,
|
|
1102
1104
|
default: qr
|
|
1103
|
-
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL: r, map: u, innerPoint: l, innerInput: n, adCode: o, addressInfo:
|
|
1105
|
+
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL: r, map: u, innerPoint: l, innerInput: n, adCode: o, addressInfo: d }) => {
|
|
1104
1106
|
e.getMapInfo = () => {
|
|
1105
1107
|
if (a.value === "baidu") {
|
|
1106
|
-
const v =
|
|
1108
|
+
const v = Et.bd09togcj02(l.value[0], l.value[1]);
|
|
1107
1109
|
return {
|
|
1108
1110
|
longitude: v[0],
|
|
1109
1111
|
latitude: v[1],
|
|
1110
1112
|
address: n.value,
|
|
1111
1113
|
adCode: o.value,
|
|
1112
|
-
addressInfo:
|
|
1114
|
+
addressInfo: d.value
|
|
1113
1115
|
};
|
|
1114
1116
|
}
|
|
1115
1117
|
if (a.value === "gaode")
|
|
@@ -1118,7 +1120,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1118
1120
|
latitude: l.value[1],
|
|
1119
1121
|
address: n.value,
|
|
1120
1122
|
adCode: o.value,
|
|
1121
|
-
addressInfo:
|
|
1123
|
+
addressInfo: d.value
|
|
1122
1124
|
};
|
|
1123
1125
|
if (a.value === "google")
|
|
1124
1126
|
return {
|
|
@@ -1126,7 +1128,7 @@ const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1126
1128
|
latitude: l.value[1],
|
|
1127
1129
|
address: n.value,
|
|
1128
1130
|
adCode: o.value,
|
|
1129
|
-
addressInfo:
|
|
1131
|
+
addressInfo: d.value
|
|
1130
1132
|
};
|
|
1131
1133
|
};
|
|
1132
1134
|
}, Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1143,18 +1145,18 @@ function an(e) {
|
|
|
1143
1145
|
return typeof e == "symbol" || re(e) && se(e) == tn;
|
|
1144
1146
|
}
|
|
1145
1147
|
var at = ee ? ee.prototype : void 0, ot = at ? at.toString : void 0;
|
|
1146
|
-
function
|
|
1148
|
+
function Lt(e) {
|
|
1147
1149
|
if (typeof e == "string")
|
|
1148
1150
|
return e;
|
|
1149
1151
|
if (ve(e))
|
|
1150
|
-
return en(e,
|
|
1152
|
+
return en(e, Lt) + "";
|
|
1151
1153
|
if (an(e))
|
|
1152
1154
|
return ot ? ot.call(e) : "";
|
|
1153
1155
|
var t = e + "";
|
|
1154
1156
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
1155
1157
|
}
|
|
1156
1158
|
function ye(e) {
|
|
1157
|
-
return e == null ? "" :
|
|
1159
|
+
return e == null ? "" : Lt(e);
|
|
1158
1160
|
}
|
|
1159
1161
|
function on(e, t, a) {
|
|
1160
1162
|
var r = -1, u = e.length;
|
|
@@ -1189,10 +1191,10 @@ function $n(e) {
|
|
|
1189
1191
|
};
|
|
1190
1192
|
}
|
|
1191
1193
|
var jn = $n("toUpperCase");
|
|
1192
|
-
function
|
|
1194
|
+
function En(e) {
|
|
1193
1195
|
return jn(ye(e).toLowerCase());
|
|
1194
1196
|
}
|
|
1195
|
-
function
|
|
1197
|
+
function Ln(e, t, a, r) {
|
|
1196
1198
|
for (var u = -1, l = e == null ? 0 : e.length; ++u < l; )
|
|
1197
1199
|
a = t(a, e[u], u, e);
|
|
1198
1200
|
return a;
|
|
@@ -1407,9 +1409,9 @@ var In = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
|
1407
1409
|
function Jn(e) {
|
|
1408
1410
|
return In.test(e);
|
|
1409
1411
|
}
|
|
1410
|
-
var Nt = "\\ud800-\\udfff", Zn = "\\u0300-\\u036f", Wn = "\\ufe20-\\ufe2f", qn = "\\u20d0-\\u20ff", Yn = Zn + Wn + qn, Ut = "\\u2700-\\u27bf", Vt = "a-z\\xdf-\\xf6\\xf8-\\xff", Xn = "\\xac\\xb1\\xd7\\xf7", Qn = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", el = "\\u2000-\\u206f", tl = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Kt = "A-Z\\xc0-\\xd6\\xd8-\\xde", al = "\\ufe0e\\ufe0f", Ft = Xn + Qn + el + tl, Ht = "['’]", rt = "[" + Ft + "]", ol = "[" + Yn + "]", It = "\\d+", rl = "[" + Ut + "]", Jt = "[" + Vt + "]", Zt = "[^" + Nt + Ft + It + Ut + Vt + Kt + "]", nl = "\\ud83c[\\udffb-\\udfff]", ll = "(?:" + ol + "|" + nl + ")", ul = "[^" + Nt + "]", Wt = "(?:\\ud83c[\\udde6-\\uddff]){2}", qt = "[\\ud800-\\udbff][\\udc00-\\udfff]", X = "[" + Kt + "]",
|
|
1412
|
+
var Nt = "\\ud800-\\udfff", Zn = "\\u0300-\\u036f", Wn = "\\ufe20-\\ufe2f", qn = "\\u20d0-\\u20ff", Yn = Zn + Wn + qn, Ut = "\\u2700-\\u27bf", Vt = "a-z\\xdf-\\xf6\\xf8-\\xff", Xn = "\\xac\\xb1\\xd7\\xf7", Qn = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", el = "\\u2000-\\u206f", tl = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Kt = "A-Z\\xc0-\\xd6\\xd8-\\xde", al = "\\ufe0e\\ufe0f", Ft = Xn + Qn + el + tl, Ht = "['’]", rt = "[" + Ft + "]", ol = "[" + Yn + "]", It = "\\d+", rl = "[" + Ut + "]", Jt = "[" + Vt + "]", Zt = "[^" + Nt + Ft + It + Ut + Vt + Kt + "]", nl = "\\ud83c[\\udffb-\\udfff]", ll = "(?:" + ol + "|" + nl + ")", ul = "[^" + Nt + "]", Wt = "(?:\\ud83c[\\udde6-\\uddff]){2}", qt = "[\\ud800-\\udbff][\\udc00-\\udfff]", X = "[" + Kt + "]", cl = "\\u200d", nt = "(?:" + Jt + "|" + Zt + ")", il = "(?:" + X + "|" + Zt + ")", lt = "(?:" + Ht + "(?:d|ll|m|re|s|t|ve))?", ut = "(?:" + Ht + "(?:D|LL|M|RE|S|T|VE))?", Yt = ll + "?", Xt = "[" + al + "]?", sl = "(?:" + cl + "(?:" + [ul, Wt, qt].join("|") + ")" + Xt + Yt + ")*", dl = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", fl = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", vl = Xt + Yt + sl, gl = "(?:" + [rl, Wt, qt].join("|") + ")" + vl, pl = RegExp([
|
|
1411
1413
|
X + "?" + Jt + "+" + lt + "(?=" + [rt, X, "$"].join("|") + ")",
|
|
1412
|
-
|
|
1414
|
+
il + "+" + ut + "(?=" + [rt, X + nt, "$"].join("|") + ")",
|
|
1413
1415
|
X + "?" + nt + "+" + lt,
|
|
1414
1416
|
X + "+" + ut,
|
|
1415
1417
|
fl,
|
|
@@ -1426,44 +1428,44 @@ function yl(e, t, a) {
|
|
|
1426
1428
|
var ml = "['’]", bl = RegExp(ml, "g");
|
|
1427
1429
|
function _l(e) {
|
|
1428
1430
|
return function(t) {
|
|
1429
|
-
return
|
|
1431
|
+
return Ln(yl(Kn(t).replace(bl, "")), e, "");
|
|
1430
1432
|
};
|
|
1431
1433
|
}
|
|
1432
1434
|
var wl = _l(function(e, t, a) {
|
|
1433
|
-
return t = t.toLowerCase(), e + (a ?
|
|
1435
|
+
return t = t.toLowerCase(), e + (a ? En(t) : t);
|
|
1434
1436
|
});
|
|
1435
|
-
const
|
|
1437
|
+
const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./get-map-info/index.ts": Qr }), xl = Object.keys(ct).reduce((e, t) => {
|
|
1436
1438
|
const a = wl(t.replace("./", "").split("/")[0]);
|
|
1437
|
-
return e[a] =
|
|
1439
|
+
return e[a] = ct[t].default, e;
|
|
1438
1440
|
}, {}), Ml = (e, t, a) => {
|
|
1439
1441
|
const r = S({});
|
|
1440
1442
|
return { mapElement: r, addPlugins: () => {
|
|
1441
|
-
const n = Ir({}, (e == null ? void 0 : e.options) || {}, (o,
|
|
1442
|
-
if (Array.isArray(o)) return o.concat(
|
|
1443
|
+
const n = Ir({}, (e == null ? void 0 : e.options) || {}, (o, d) => {
|
|
1444
|
+
if (Array.isArray(o)) return o.concat(d);
|
|
1443
1445
|
});
|
|
1444
1446
|
Object.values(xl).forEach((o) => o(r.value, t, a, n.plugins || {}));
|
|
1445
1447
|
} };
|
|
1446
|
-
}, Cl = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode:
|
|
1447
|
-
const C = S(), x = S(),
|
|
1448
|
-
let
|
|
1449
|
-
const
|
|
1448
|
+
}, Cl = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: d, addressInfo: v }, b) => {
|
|
1449
|
+
const C = S(), x = S(), R = S();
|
|
1450
|
+
let E = null;
|
|
1451
|
+
const i = S(!1), c = S();
|
|
1450
1452
|
let h;
|
|
1451
|
-
const A = async (
|
|
1452
|
-
if (
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
|
|
1453
|
+
const A = async (s, f, m, M) => {
|
|
1454
|
+
if (c.value = m, M && (h = M), document.getElementById(s)) return B();
|
|
1455
|
+
const y = document.createElement("script"), T = `mapLoad${(/* @__PURE__ */ new Date()).getTime()}`, G = `https://maps.googleapis.com/maps/api/js?key=${s}&loading=async&callback=${T}`;
|
|
1456
|
+
y.setAttribute("id", s), y.setAttribute("src", G), document.body.appendChild(y), window[T] = () => {
|
|
1457
|
+
B();
|
|
1456
1458
|
};
|
|
1457
|
-
},
|
|
1458
|
-
var
|
|
1459
|
-
const { Map:
|
|
1460
|
-
e.value =
|
|
1461
|
-
const { Place: f, AutocompleteSessionToken:
|
|
1462
|
-
x.value = new
|
|
1463
|
-
const { AdvancedMarkerElement:
|
|
1464
|
-
|
|
1465
|
-
const
|
|
1466
|
-
t.value = new
|
|
1459
|
+
}, B = async () => {
|
|
1460
|
+
var G, L;
|
|
1461
|
+
const { Map: s } = await google.maps.importLibrary("maps");
|
|
1462
|
+
e.value = s;
|
|
1463
|
+
const { Place: f, AutocompleteSessionToken: m, AutocompleteSuggestion: M } = await google.maps.importLibrary("places");
|
|
1464
|
+
x.value = new m(), R.value = M, C.value = f;
|
|
1465
|
+
const { AdvancedMarkerElement: y } = await google.maps.importLibrary("marker");
|
|
1466
|
+
E = y;
|
|
1467
|
+
const T = ((G = c.value) == null ? void 0 : G.mapOpt) ?? {};
|
|
1468
|
+
t.value = new s(document.getElementById("map"), {
|
|
1467
1469
|
zoom: 11,
|
|
1468
1470
|
mapId: "DEMO_MAP_ID",
|
|
1469
1471
|
fullscreenControl: !1,
|
|
@@ -1474,32 +1476,32 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1474
1476
|
// 左上角地图类型
|
|
1475
1477
|
gestureHandling: "greedy",
|
|
1476
1478
|
// 谷歌地图api缩放去掉ctrl+滚轮缩放,直接鼠标缩放
|
|
1477
|
-
...
|
|
1478
|
-
}), await
|
|
1479
|
+
...T
|
|
1480
|
+
}), await j(), (L = c.value) != null && L.clickStream || _(), r.value = !1, i.value = !n.value && !o.value.length, h && h();
|
|
1479
1481
|
}, _ = () => {
|
|
1480
|
-
var
|
|
1481
|
-
(
|
|
1482
|
-
var
|
|
1483
|
-
a.value && a.value.setMap(null), o.value = [(
|
|
1484
|
-
var
|
|
1485
|
-
const
|
|
1482
|
+
var s;
|
|
1483
|
+
(s = t.value) == null || s.addListener("click", (f) => {
|
|
1484
|
+
var m, M;
|
|
1485
|
+
a.value && a.value.setMap(null), o.value = [(m = f == null ? void 0 : f.latLng) == null ? void 0 : m.lng(), (M = f == null ? void 0 : f.latLng) == null ? void 0 : M.lat()], D(o.value, !0).then(() => {
|
|
1486
|
+
var T;
|
|
1487
|
+
const y = {
|
|
1486
1488
|
lng: parseFloat(o.value[0]),
|
|
1487
1489
|
lat: parseFloat(o.value[1])
|
|
1488
1490
|
};
|
|
1489
|
-
a.value = new
|
|
1491
|
+
a.value = new E({
|
|
1490
1492
|
map: t.value,
|
|
1491
|
-
position:
|
|
1493
|
+
position: y,
|
|
1492
1494
|
title: n.value
|
|
1493
1495
|
// 鼠标移上去时显示的内容
|
|
1494
|
-
}), (
|
|
1496
|
+
}), (T = t.value) == null || T.panTo(y), console.log("当前的地址坐标信息:", o.value, n.value);
|
|
1495
1497
|
});
|
|
1496
1498
|
});
|
|
1497
|
-
},
|
|
1498
|
-
var
|
|
1499
|
-
if (!n.value && o.value.length, n.value && o.value.length > 0 ? await
|
|
1500
|
-
if (
|
|
1501
|
-
const M =
|
|
1502
|
-
(
|
|
1499
|
+
}, j = async () => {
|
|
1500
|
+
var s;
|
|
1501
|
+
if (!n.value && o.value.length, n.value && o.value.length > 0 ? await D(o.value) : n.value ? await U(n.value) : o.value.length > 0 && await D(o.value, !0), n.value && g(n.value, (f, m) => {
|
|
1502
|
+
if (m && m.length) {
|
|
1503
|
+
const M = m.find(
|
|
1504
|
+
(y) => y.value === n.value || y.info.name === n.value
|
|
1503
1505
|
);
|
|
1504
1506
|
M ? v.value = M.info : v.value = {
|
|
1505
1507
|
district: "",
|
|
@@ -1512,43 +1514,47 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1512
1514
|
lng: parseFloat(o.value[0]),
|
|
1513
1515
|
lat: parseFloat(o.value[1])
|
|
1514
1516
|
};
|
|
1515
|
-
a.value = new
|
|
1517
|
+
a.value = new E({
|
|
1516
1518
|
map: t.value,
|
|
1517
1519
|
position: f,
|
|
1518
1520
|
title: n.value
|
|
1519
1521
|
// 鼠标移上去时显示的内容
|
|
1520
|
-
}), o.value.length && ((
|
|
1522
|
+
}), o.value.length && ((s = t.value) == null || s.setCenter(f));
|
|
1521
1523
|
}
|
|
1522
|
-
},
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1524
|
+
}, D = (s, f = !1) => {
|
|
1525
|
+
const m = s.join(",");
|
|
1526
|
+
return new Promise((M, y) => {
|
|
1527
|
+
new google.maps.Geocoder().geocode({
|
|
1528
|
+
location: {
|
|
1529
|
+
lng: parseFloat(s[0]),
|
|
1530
|
+
lat: parseFloat(s[1])
|
|
1531
|
+
}
|
|
1532
|
+
}, (G, L) => {
|
|
1533
|
+
console.log(`${m}逆地址解析=======`, L, G, f), L === "OK" && (G != null && G.length) ? (f && (n.value = G[0].formatted_address ?? "", v.value = {
|
|
1534
|
+
district: "",
|
|
1535
|
+
address: "",
|
|
1536
|
+
name: n.value
|
|
1537
|
+
}), M(G[0])) : (N.error(k("thirdPartyMapErrorRetry")), y());
|
|
1538
|
+
});
|
|
1534
1539
|
});
|
|
1535
|
-
}
|
|
1540
|
+
}, U = (s) => new Promise((f, m) => {
|
|
1536
1541
|
new google.maps.Geocoder().geocode({
|
|
1537
1542
|
address: n.value
|
|
1538
|
-
}, (
|
|
1539
|
-
|
|
1543
|
+
}, (y, T) => {
|
|
1544
|
+
console.log(`${s}地址解析出经纬度=======`, T, y), T === "OK" && (y != null && y.length) ? (o.value[0] = y[0].geometry.location.lng(), o.value[1] = y[0].geometry.location.lat(), f({ lng: o.value[0], lat: o.value[1] })) : (N.error(k("thirdPartyMapErrorRetry")), m());
|
|
1540
1545
|
});
|
|
1541
|
-
}),
|
|
1542
|
-
var
|
|
1543
|
-
r.value = !0, navigator.geolocation && ((
|
|
1546
|
+
}), O = async () => {
|
|
1547
|
+
var s;
|
|
1548
|
+
console.log("定位到当前城市"), r.value = !0, navigator.geolocation && ((s = navigator.geolocation) == null || s.getCurrentPosition((f) => {
|
|
1544
1549
|
var M;
|
|
1545
|
-
|
|
1550
|
+
console.log("当前城市: ", f);
|
|
1551
|
+
const m = {
|
|
1546
1552
|
lat: f.coords.latitude,
|
|
1547
1553
|
lng: f.coords.longitude
|
|
1548
1554
|
};
|
|
1549
|
-
(M = t.value) == null || M.panTo(
|
|
1555
|
+
(M = t.value) == null || M.panTo(m), i.value = !1, r.value = !1;
|
|
1550
1556
|
}, (f) => {
|
|
1551
|
-
|
|
1557
|
+
console.error("获取定位失败: ", f), N.error(k("获取定位失败")), r.value = !1;
|
|
1552
1558
|
}, {
|
|
1553
1559
|
// enableHighAccuracy: true,
|
|
1554
1560
|
// timeout: 5000,
|
|
@@ -1557,177 +1563,177 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1557
1563
|
enableHighAccuracy: !0,
|
|
1558
1564
|
timeout: 1e4
|
|
1559
1565
|
}));
|
|
1560
|
-
}, g = async (
|
|
1561
|
-
if (u.value.activated = !0, !
|
|
1566
|
+
}, g = async (s, f) => {
|
|
1567
|
+
if (u.value.activated = !0, !s) {
|
|
1562
1568
|
l.value = [], f([]);
|
|
1563
1569
|
return;
|
|
1564
1570
|
}
|
|
1565
|
-
let
|
|
1566
|
-
input:
|
|
1571
|
+
let m = {
|
|
1572
|
+
input: s,
|
|
1567
1573
|
origin: { lng: parseFloat(o.value[0]), lat: parseFloat(o.value[1]) },
|
|
1568
1574
|
sessionToken: x.value
|
|
1569
1575
|
};
|
|
1570
|
-
const { suggestions: M } = await
|
|
1576
|
+
const { suggestions: M } = await R.value.fetchAutocompleteSuggestions(m);
|
|
1571
1577
|
if (l.value = [], !M) return f([]);
|
|
1572
|
-
let
|
|
1578
|
+
let y = [];
|
|
1573
1579
|
await Promise.all(
|
|
1574
|
-
M.map((
|
|
1580
|
+
M.map((T) => (async () => {
|
|
1575
1581
|
var J, le;
|
|
1576
|
-
let
|
|
1577
|
-
await
|
|
1582
|
+
let L = (T == null ? void 0 : T.placePrediction).toPlace();
|
|
1583
|
+
await L.fetchFields({
|
|
1578
1584
|
fields: [
|
|
1579
1585
|
"displayName",
|
|
1580
1586
|
"formattedAddress",
|
|
1581
1587
|
"location"
|
|
1582
1588
|
]
|
|
1583
1589
|
});
|
|
1584
|
-
const ne = (J =
|
|
1590
|
+
const ne = (J = L == null ? void 0 : L.location) == null ? void 0 : J.lng(), V = (le = L == null ? void 0 : L.location) == null ? void 0 : le.lat(), K = {
|
|
1585
1591
|
// value: placePrediction?.text?.toString() || '',
|
|
1586
|
-
value:
|
|
1592
|
+
value: L == null ? void 0 : L.formattedAddress,
|
|
1587
1593
|
point: { lng: ne, lat: V },
|
|
1588
1594
|
info: {
|
|
1589
|
-
name:
|
|
1595
|
+
name: L == null ? void 0 : L.displayName
|
|
1590
1596
|
}
|
|
1591
1597
|
};
|
|
1592
|
-
|
|
1598
|
+
y.push(K);
|
|
1593
1599
|
})())
|
|
1594
|
-
), l.value =
|
|
1600
|
+
), l.value = y.length > 5 ? y.slice(0, 5) : y, f(l.value, y);
|
|
1595
1601
|
};
|
|
1596
1602
|
return {
|
|
1597
1603
|
getLocationByInputSearch: g,
|
|
1598
|
-
handleSelectAddress: (
|
|
1599
|
-
n.value =
|
|
1600
|
-
var
|
|
1601
|
-
o.value = [f.lng, f.lat], a.value && a.value.setMap(null), a.value = new
|
|
1604
|
+
handleSelectAddress: (s) => {
|
|
1605
|
+
n.value = s.value, v.value = s.info, U(s.value).then((f) => {
|
|
1606
|
+
var m;
|
|
1607
|
+
o.value = [f.lng, f.lat], a.value && a.value.setMap(null), a.value = new E({
|
|
1602
1608
|
map: t.value,
|
|
1603
1609
|
position: f,
|
|
1604
1610
|
title: n.value
|
|
1605
1611
|
// 鼠标移上去时显示的内容
|
|
1606
|
-
}), (
|
|
1612
|
+
}), (m = t.value) == null || m.panTo(f), i.value = !1;
|
|
1607
1613
|
});
|
|
1608
1614
|
},
|
|
1609
1615
|
getLocationParse: async () => {
|
|
1610
|
-
var
|
|
1616
|
+
var s, f;
|
|
1611
1617
|
if (l.value.length) {
|
|
1612
|
-
if (n.value = l.value[0].value, !((
|
|
1613
|
-
return
|
|
1614
|
-
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, a.value = new
|
|
1618
|
+
if (console.log("检索列表:", l.value), n.value = l.value[0].value, !((s = l.value[0]) != null && s.point))
|
|
1619
|
+
return N.error(k("thirdPartyMapErrorRetry"));
|
|
1620
|
+
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, a.value = new E({
|
|
1615
1621
|
map: t.value,
|
|
1616
1622
|
position: l.value[0].point,
|
|
1617
1623
|
title: n.value
|
|
1618
1624
|
// 鼠标移上去时显示的内容
|
|
1619
|
-
}), (f = t.value) == null || f.panTo(l.value[0].point),
|
|
1625
|
+
}), (f = t.value) == null || f.panTo(l.value[0].point), i.value = !1, u.value.activated = !1;
|
|
1620
1626
|
}
|
|
1621
1627
|
},
|
|
1622
1628
|
getMapInfo: () => ({
|
|
1623
1629
|
longitude: o.value[0],
|
|
1624
1630
|
latitude: o.value[1],
|
|
1625
|
-
adCode:
|
|
1631
|
+
adCode: d.value,
|
|
1626
1632
|
address: n.value,
|
|
1627
1633
|
addressInfo: v.value
|
|
1628
1634
|
}),
|
|
1629
1635
|
loadJavascript: A,
|
|
1630
|
-
positionCityLocal:
|
|
1631
|
-
showGetLocationBtn:
|
|
1636
|
+
positionCityLocal: O,
|
|
1637
|
+
showGetLocationBtn: i
|
|
1632
1638
|
};
|
|
1633
1639
|
}, Al = (e, t) => {
|
|
1634
|
-
const a = S("gaode"), r = S(), u = S(), l = H(null), n = H(null), o = H(null),
|
|
1640
|
+
const a = S("gaode"), r = S(), u = S(), l = H(null), n = H(null), o = H(null), d = S(!0), v = S(null), b = S([]), C = Se(() => ({
|
|
1635
1641
|
width: e.width ? Q(e.width) : "100%",
|
|
1636
1642
|
height: e.height ? Q(e.height) : "100%"
|
|
1637
|
-
})), x = S(""),
|
|
1638
|
-
loadJavascript:
|
|
1643
|
+
})), x = S(""), R = S([]), E = S(""), i = S(), {
|
|
1644
|
+
loadJavascript: c,
|
|
1639
1645
|
getLocationByInputSearch: h,
|
|
1640
1646
|
handleSelectAddress: A,
|
|
1641
|
-
getLocationParse:
|
|
1647
|
+
getLocationParse: B
|
|
1642
1648
|
} = ft({
|
|
1643
1649
|
BMap: l,
|
|
1644
1650
|
map: n,
|
|
1645
1651
|
marker: o,
|
|
1646
|
-
mapLoading:
|
|
1652
|
+
mapLoading: d,
|
|
1647
1653
|
$autocomplete: v,
|
|
1648
1654
|
searchResultList: b,
|
|
1649
1655
|
innerInput: x,
|
|
1650
|
-
innerPoint:
|
|
1651
|
-
adCode:
|
|
1652
|
-
addressInfo:
|
|
1656
|
+
innerPoint: R,
|
|
1657
|
+
adCode: E,
|
|
1658
|
+
addressInfo: i
|
|
1653
1659
|
}), {
|
|
1654
1660
|
loadJavascript: _,
|
|
1655
|
-
getLocationByInputSearch:
|
|
1656
|
-
handleSelectAddress:
|
|
1661
|
+
getLocationByInputSearch: j,
|
|
1662
|
+
handleSelectAddress: D,
|
|
1657
1663
|
getLocationParse: U
|
|
1658
1664
|
} = st({
|
|
1659
1665
|
MapGL: l,
|
|
1660
1666
|
map: n,
|
|
1661
1667
|
marker: o,
|
|
1662
|
-
mapLoading:
|
|
1668
|
+
mapLoading: d,
|
|
1663
1669
|
$autocomplete: v,
|
|
1664
1670
|
searchResultList: b,
|
|
1665
1671
|
innerInput: x,
|
|
1666
|
-
innerPoint:
|
|
1667
|
-
adCode:
|
|
1668
|
-
addressInfo:
|
|
1672
|
+
innerPoint: R,
|
|
1673
|
+
adCode: E,
|
|
1674
|
+
addressInfo: i
|
|
1669
1675
|
}), {
|
|
1670
|
-
loadJavascript:
|
|
1676
|
+
loadJavascript: O,
|
|
1671
1677
|
getLocationByInputSearch: g,
|
|
1672
1678
|
handleSelectAddress: p,
|
|
1673
1679
|
getLocationParse: w,
|
|
1674
|
-
positionCityLocal:
|
|
1675
|
-
showGetLocationBtn:
|
|
1680
|
+
positionCityLocal: $,
|
|
1681
|
+
showGetLocationBtn: s
|
|
1676
1682
|
} = Cl({
|
|
1677
1683
|
MapGL: l,
|
|
1678
1684
|
map: n,
|
|
1679
1685
|
marker: o,
|
|
1680
|
-
mapLoading:
|
|
1686
|
+
mapLoading: d,
|
|
1681
1687
|
$autocomplete: v,
|
|
1682
1688
|
searchResultList: b,
|
|
1683
1689
|
innerInput: x,
|
|
1684
|
-
innerPoint:
|
|
1685
|
-
adCode:
|
|
1686
|
-
addressInfo:
|
|
1687
|
-
}), { mapElement: f, addPlugins:
|
|
1690
|
+
innerPoint: R,
|
|
1691
|
+
adCode: E,
|
|
1692
|
+
addressInfo: i
|
|
1693
|
+
}), { mapElement: f, addPlugins: m } = Ml(e, t, {
|
|
1688
1694
|
type: a,
|
|
1689
1695
|
MapGL: l,
|
|
1690
1696
|
map: n,
|
|
1691
|
-
innerPoint:
|
|
1697
|
+
innerPoint: R,
|
|
1692
1698
|
innerInput: x,
|
|
1693
|
-
adCode:
|
|
1694
|
-
addressInfo:
|
|
1699
|
+
adCode: E,
|
|
1700
|
+
addressInfo: i
|
|
1695
1701
|
}), M = () => {
|
|
1696
|
-
a.value === "baidu" &&
|
|
1702
|
+
a.value === "baidu" && c(r.value, { clickStream: !e.clickStream, mapOpt: e.mapOpt }, T), a.value === "gaode" && _(
|
|
1697
1703
|
r.value,
|
|
1698
1704
|
u.value,
|
|
1699
1705
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1700
|
-
|
|
1701
|
-
), a.value === "google" &&
|
|
1706
|
+
T
|
|
1707
|
+
), a.value === "google" && O(
|
|
1702
1708
|
r.value,
|
|
1703
1709
|
u.value,
|
|
1704
1710
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1705
|
-
|
|
1711
|
+
T
|
|
1706
1712
|
);
|
|
1707
|
-
},
|
|
1713
|
+
}, y = async (V) => {
|
|
1708
1714
|
const [K, J] = await Ge(V);
|
|
1709
1715
|
if (K) {
|
|
1710
|
-
|
|
1716
|
+
d.value = !1;
|
|
1711
1717
|
return;
|
|
1712
1718
|
}
|
|
1713
1719
|
if (!K && !J) {
|
|
1714
|
-
t("no-config-map",
|
|
1720
|
+
t("no-config-map", k("暂未配置地图")), d.value = !1;
|
|
1715
1721
|
return;
|
|
1716
1722
|
}
|
|
1717
1723
|
return J;
|
|
1718
1724
|
};
|
|
1719
1725
|
Oe(async () => {
|
|
1720
1726
|
var V, K, J, le, Ve;
|
|
1721
|
-
if (e.defaultLongitude && e.defaultLatitude && (
|
|
1727
|
+
if (e.defaultLongitude && e.defaultLatitude && (R.value = [e.defaultLongitude, e.defaultLatitude]), x.value = e.defaultAddress ?? "", e != null && e.sdkConfig && ((V = e == null ? void 0 : e.sdkConfig) != null && V.akValue))
|
|
1722
1728
|
a.value = ((K = e.sdkConfig) == null ? void 0 : K.mapType) ?? "gaode", r.value = (J = e.sdkConfig) == null ? void 0 : J.akValue, u.value = (le = e.sdkConfig) == null ? void 0 : le.secretKey;
|
|
1723
1729
|
else {
|
|
1724
|
-
const F = await
|
|
1730
|
+
const F = await y((Ve = e == null ? void 0 : e.sdkConfig) == null ? void 0 : Ve.mapType);
|
|
1725
1731
|
F && (a.value = (F == null ? void 0 : F.mapType) ?? "gaode", r.value = F == null ? void 0 : F.akVal, u.value = F == null ? void 0 : F.secretK);
|
|
1726
1732
|
}
|
|
1727
1733
|
M();
|
|
1728
1734
|
});
|
|
1729
|
-
const
|
|
1730
|
-
f.value = n.value,
|
|
1735
|
+
const T = () => {
|
|
1736
|
+
f.value = n.value, m(), a.value === "baidu" && n.value.addEventListener("tilesloaded", () => {
|
|
1731
1737
|
t("update:mapElement", f.value);
|
|
1732
1738
|
}), a.value === "gaode" && n.value.on("complete", () => {
|
|
1733
1739
|
t("update:mapElement", f.value);
|
|
@@ -1737,18 +1743,18 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1737
1743
|
mapStyle: C,
|
|
1738
1744
|
innerInput: x,
|
|
1739
1745
|
getLocationByInputSearch: (V, K) => {
|
|
1740
|
-
a.value === "baidu" && h(V, K), a.value === "gaode" &&
|
|
1746
|
+
a.value === "baidu" && h(V, K), a.value === "gaode" && j(V, K), a.value === "google" && g(V, K);
|
|
1741
1747
|
},
|
|
1742
1748
|
handleSelectAddress: (V) => {
|
|
1743
|
-
a.value === "baidu" && A(V), a.value === "gaode" &&
|
|
1749
|
+
a.value === "baidu" && A(V), a.value === "gaode" && D(V), a.value === "google" && p(V);
|
|
1744
1750
|
},
|
|
1745
1751
|
getLocationParse: () => {
|
|
1746
|
-
a.value === "baidu" &&
|
|
1752
|
+
a.value === "baidu" && B(), a.value === "gaode" && U(), a.value === "google" && w();
|
|
1747
1753
|
},
|
|
1748
|
-
mapLoading:
|
|
1754
|
+
mapLoading: d,
|
|
1749
1755
|
$autocomplete: v,
|
|
1750
|
-
googlePositionCityLocal:
|
|
1751
|
-
showGetLocationBtn:
|
|
1756
|
+
googlePositionCityLocal: $,
|
|
1757
|
+
showGetLocationBtn: s
|
|
1752
1758
|
};
|
|
1753
1759
|
}, Sl = { class: "search-input" }, Ol = { class: "location-icon1" }, Tl = { id: "map" }, $l = /* @__PURE__ */ Ae({
|
|
1754
1760
|
__name: "mixMap",
|
|
@@ -1772,39 +1778,39 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1772
1778
|
innerInput: l,
|
|
1773
1779
|
getLocationByInputSearch: n,
|
|
1774
1780
|
handleSelectAddress: o,
|
|
1775
|
-
getLocationParse:
|
|
1781
|
+
getLocationParse: d,
|
|
1776
1782
|
mapLoading: v,
|
|
1777
1783
|
$autocomplete: b,
|
|
1778
1784
|
googlePositionCityLocal: C,
|
|
1779
1785
|
showGetLocationBtn: x
|
|
1780
1786
|
} = Al(a, r);
|
|
1781
|
-
return (
|
|
1782
|
-
const
|
|
1787
|
+
return (R, E) => {
|
|
1788
|
+
const i = Pe, c = ke;
|
|
1783
1789
|
return $e(), Te(
|
|
1784
1790
|
"div",
|
|
1785
1791
|
{
|
|
1786
1792
|
class: "das-map",
|
|
1787
|
-
style: je(
|
|
1793
|
+
style: je(z(u))
|
|
1788
1794
|
},
|
|
1789
1795
|
[
|
|
1790
1796
|
Z(W(
|
|
1791
1797
|
"div",
|
|
1792
1798
|
Sl,
|
|
1793
1799
|
[
|
|
1794
|
-
Z(de(
|
|
1800
|
+
Z(de(i, {
|
|
1795
1801
|
ref_key: "$autocomplete",
|
|
1796
1802
|
ref: b,
|
|
1797
|
-
modelValue:
|
|
1798
|
-
"onUpdate:modelValue":
|
|
1799
|
-
"fetch-suggestions":
|
|
1800
|
-
placeholder:
|
|
1803
|
+
modelValue: z(l),
|
|
1804
|
+
"onUpdate:modelValue": E[0] || (E[0] = (h) => ta(l) ? l.value = h : null),
|
|
1805
|
+
"fetch-suggestions": z(n),
|
|
1806
|
+
placeholder: z(k)("请输入位置"),
|
|
1801
1807
|
style: { width: "100%" },
|
|
1802
1808
|
"trigger-on-focus": !1,
|
|
1803
|
-
onSelect:
|
|
1804
|
-
onKeyup:
|
|
1809
|
+
onSelect: z(o),
|
|
1810
|
+
onKeyup: Ee(z(d), ["enter", "native"]),
|
|
1805
1811
|
clearable: ""
|
|
1806
1812
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
1807
|
-
[
|
|
1813
|
+
[z(Re)]
|
|
1808
1814
|
])
|
|
1809
1815
|
],
|
|
1810
1816
|
512
|
|
@@ -1816,14 +1822,14 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1816
1822
|
"div",
|
|
1817
1823
|
Ol,
|
|
1818
1824
|
[
|
|
1819
|
-
de(
|
|
1825
|
+
de(z(la), {
|
|
1820
1826
|
block: "",
|
|
1821
1827
|
size: "large",
|
|
1822
|
-
onClick:
|
|
1828
|
+
onClick: z(C)
|
|
1823
1829
|
}, {
|
|
1824
1830
|
default: aa(() => [
|
|
1825
1831
|
oa(
|
|
1826
|
-
ra(
|
|
1832
|
+
ra(z(k)("Please-Click-Get-Location")),
|
|
1827
1833
|
1
|
|
1828
1834
|
/* TEXT */
|
|
1829
1835
|
)
|
|
@@ -1835,7 +1841,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1835
1841
|
512
|
|
1836
1842
|
/* NEED_PATCH */
|
|
1837
1843
|
), [
|
|
1838
|
-
[Ke,
|
|
1844
|
+
[Ke, z(x)]
|
|
1839
1845
|
]),
|
|
1840
1846
|
Z(W(
|
|
1841
1847
|
"div",
|
|
@@ -1845,8 +1851,8 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1845
1851
|
/* NEED_PATCH */
|
|
1846
1852
|
), [
|
|
1847
1853
|
[
|
|
1848
|
-
|
|
1849
|
-
|
|
1854
|
+
c,
|
|
1855
|
+
z(v),
|
|
1850
1856
|
void 0,
|
|
1851
1857
|
{ lock: !0 }
|
|
1852
1858
|
]
|
|
@@ -1857,7 +1863,7 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1857
1863
|
);
|
|
1858
1864
|
};
|
|
1859
1865
|
}
|
|
1860
|
-
}), jl = /* @__PURE__ */ Be($l, [["__scopeId", "data-v-9c0f471e"]]),
|
|
1866
|
+
}), jl = /* @__PURE__ */ Be($l, [["__scopeId", "data-v-9c0f471e"]]), El = {
|
|
1861
1867
|
请输入位置: { "zh-CN": "请输入位置", en: "Please enter location", _appCode: "framework" },
|
|
1862
1868
|
获取地图配置信息失败: {
|
|
1863
1869
|
"zh-CN": "获取地图配置信息失败",
|
|
@@ -1881,8 +1887,8 @@ const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1881
1887
|
_appCode: "framework"
|
|
1882
1888
|
}
|
|
1883
1889
|
};
|
|
1884
|
-
na(
|
|
1885
|
-
const Kl =
|
|
1890
|
+
na(El);
|
|
1891
|
+
const Kl = Le(ga), Fl = () => S(null), Hl = Le(ma), Il = () => S(null), Jl = Le(jl), Zl = () => S(null), Wl = { title: "Map 地图" };
|
|
1886
1892
|
export {
|
|
1887
1893
|
Hl as DasBaiduMap,
|
|
1888
1894
|
Il as DasBaiduMapRef,
|