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