@me-framework/me-ui-antdv-next 0.0.26 → 0.0.28
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/dist/chunks/input-icon-selector-BrrR4KK6.js +228 -0
- package/dist/icon/index.js +1 -1
- package/dist/input-gps/index.js +85 -233
- package/dist/input-gps/index.vue.d.ts +3 -1
- package/dist/input-gps/map.vue.d.ts +1 -1
- package/dist/input-gps/types.d.ts +9 -5
- package/dist/input-icon-selector/index.js +1 -1
- package/dist/input-icon-selector/index.vue.d.ts +1 -1
- package/dist/load-json/index.css +1 -0
- package/dist/load-json/index.js +81 -24275
- package/dist/me-ui-antdv-next.js +61 -47
- package/dist/me-ui-antdv-next.umd.cjs +2 -2
- package/dist/message/index.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/nav/index.js +1 -1
- package/dist/resolver/index.d.ts +1 -1
- package/dist/resolver/index.js +7 -4
- package/dist/tree-menu/index.js +2 -2
- package/package.json +6 -6
- package/dist/chunks/input-icon-selector-D5c45QL8.js +0 -227
- package/dist/chunks/rolldown-runtime-DtPi1Y-2.js +0 -13
- package/dist/load-json.css +0 -1
- /package/dist/{base.css → base/index.css} +0 -0
- /package/dist/{body.css → body/index.css} +0 -0
- /package/dist/{box.css → box/index.css} +0 -0
- /package/dist/{breadcrumb.css → breadcrumb/index.css} +0 -0
- /package/dist/{card.css → card/index.css} +0 -0
- /package/dist/chunks/{icon-DdoH0MfT.js → icon-CXjgApCy.js} +0 -0
- /package/dist/chunks/{message-CPHX2tAR.js → message-D2zYiiQe.js} +0 -0
- /package/dist/chunks/{modal-Dke8ng3P.js → modal-KBZYtIHD.js} +0 -0
- /package/dist/{icon.css → icon/index.css} +0 -0
- /package/dist/{input-gps.css → input-gps/index.css} +0 -0
- /package/dist/{input-icon-selector.css → input-icon-selector/index.css} +0 -0
- /package/dist/{input-radio.css → input-radio/index.css} +0 -0
- /package/dist/{login-page.css → login-page/index.css} +0 -0
- /package/dist/{menu.css → menu/index.css} +0 -0
- /package/dist/{message.css → message/index.css} +0 -0
- /package/dist/{modal.css → modal/index.css} +0 -0
- /package/dist/{nav.css → nav/index.css} +0 -0
- /package/dist/{skeleton.css → skeleton/index.css} +0 -0
- /package/dist/{tree-menu.css → tree-menu/index.css} +0 -0
package/dist/input-gps/index.js
CHANGED
|
@@ -1,183 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
//#endregion
|
|
1
|
+
import e from "../icon/index.js";
|
|
2
|
+
import { t } from "../chunks/modal-KBZYtIHD.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, nextTick as d, normalizeStyle as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, shallowRef as _, toDisplayString as v, unref as y, watch as b, withCtx as x } from "vue";
|
|
4
|
+
import S from "@amap/amap-jsapi-loader";
|
|
6
5
|
//#region src/components/input-gps/map.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
-
(function(n, r) {
|
|
9
|
-
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self, n.AMapLoader = r());
|
|
10
|
-
})(e, function() {
|
|
11
|
-
function e(e) {
|
|
12
|
-
var r = [];
|
|
13
|
-
return e.AMapUI && r.push(t(e.AMapUI)), e.Loca && r.push(n(e.Loca)), Promise.all(r);
|
|
14
|
-
}
|
|
15
|
-
function t(e) {
|
|
16
|
-
return new Promise(function(t, n) {
|
|
17
|
-
var s = [];
|
|
18
|
-
if (e.plugins) for (var c = 0; c < e.plugins.length; c += 1) i.AMapUI.plugins.indexOf(e.plugins[c]) == -1 && s.push(e.plugins[c]);
|
|
19
|
-
if (a.AMapUI === r.failed) n("前次请求 AMapUI 失败");
|
|
20
|
-
else if (a.AMapUI === r.notload) {
|
|
21
|
-
a.AMapUI = r.loading, i.AMapUI.version = e.version || i.AMapUI.version, c = i.AMapUI.version;
|
|
22
|
-
var l = document.body || document.head, u = document.createElement("script");
|
|
23
|
-
u.type = "text/javascript", u.src = "https://webapi.amap.com/ui/" + c + "/main.js", u.onerror = function(e) {
|
|
24
|
-
a.AMapUI = r.failed, n("请求 AMapUI 失败");
|
|
25
|
-
}, u.onload = function() {
|
|
26
|
-
if (a.AMapUI = r.loaded, s.length) window.AMapUI.loadUI(s, function() {
|
|
27
|
-
for (var e = 0, n = s.length; e < n; e++) {
|
|
28
|
-
var r = s[e].split("/").slice(-1)[0];
|
|
29
|
-
window.AMapUI[r] = arguments[e];
|
|
30
|
-
}
|
|
31
|
-
for (t(); o.AMapUI.length;) o.AMapUI.splice(0, 1)[0]();
|
|
32
|
-
});
|
|
33
|
-
else for (t(); o.AMapUI.length;) o.AMapUI.splice(0, 1)[0]();
|
|
34
|
-
}, l.appendChild(u);
|
|
35
|
-
} else a.AMapUI === r.loaded ? e.version && e.version !== i.AMapUI.version ? n("不允许多个版本 AMapUI 混用") : s.length ? window.AMapUI.loadUI(s, function() {
|
|
36
|
-
for (var e = 0, n = s.length; e < n; e++) {
|
|
37
|
-
var r = s[e].split("/").slice(-1)[0];
|
|
38
|
-
window.AMapUI[r] = arguments[e];
|
|
39
|
-
}
|
|
40
|
-
t();
|
|
41
|
-
}) : t() : e.version && e.version !== i.AMapUI.version ? n("不允许多个版本 AMapUI 混用") : o.AMapUI.push(function(e) {
|
|
42
|
-
e ? n(e) : s.length ? window.AMapUI.loadUI(s, function() {
|
|
43
|
-
for (var e = 0, n = s.length; e < n; e++) {
|
|
44
|
-
var r = s[e].split("/").slice(-1)[0];
|
|
45
|
-
window.AMapUI[r] = arguments[e];
|
|
46
|
-
}
|
|
47
|
-
t();
|
|
48
|
-
}) : t();
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function n(e) {
|
|
53
|
-
return new Promise(function(t, n) {
|
|
54
|
-
if (a.Loca === r.failed) n("前次请求 Loca 失败");
|
|
55
|
-
else if (a.Loca === r.notload) {
|
|
56
|
-
a.Loca = r.loading, i.Loca.version = e.version || i.Loca.version;
|
|
57
|
-
var s = i.Loca.version, c = i.AMap.version.startsWith("2"), l = s.startsWith("2");
|
|
58
|
-
if (c && !l || !c && l) n("JSAPI 与 Loca 版本不对应!!");
|
|
59
|
-
else {
|
|
60
|
-
c = i.key, l = document.body || document.head;
|
|
61
|
-
var u = document.createElement("script");
|
|
62
|
-
u.type = "text/javascript", u.src = "https://webapi.amap.com/loca?v=" + s + "&key=" + c, u.onerror = function(e) {
|
|
63
|
-
a.Loca = r.failed, n("请求 AMapUI 失败");
|
|
64
|
-
}, u.onload = function() {
|
|
65
|
-
for (a.Loca = r.loaded, t(); o.Loca.length;) o.Loca.splice(0, 1)[0]();
|
|
66
|
-
}, l.appendChild(u);
|
|
67
|
-
}
|
|
68
|
-
} else a.Loca === r.loaded ? e.version && e.version !== i.Loca.version ? n("不允许多个版本 Loca 混用") : t() : e.version && e.version !== i.Loca.version ? n("不允许多个版本 Loca 混用") : o.Loca.push(function(e) {
|
|
69
|
-
e ? n(e) : n();
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (!window) throw Error("AMap JSAPI can only be used in Browser.");
|
|
74
|
-
var r;
|
|
75
|
-
(function(e) {
|
|
76
|
-
e.notload = "notload", e.loading = "loading", e.loaded = "loaded", e.failed = "failed";
|
|
77
|
-
})(r ||= {});
|
|
78
|
-
var i = {
|
|
79
|
-
key: "",
|
|
80
|
-
AMap: {
|
|
81
|
-
version: "1.4.15",
|
|
82
|
-
plugins: []
|
|
83
|
-
},
|
|
84
|
-
AMapUI: {
|
|
85
|
-
version: "1.1",
|
|
86
|
-
plugins: []
|
|
87
|
-
},
|
|
88
|
-
Loca: { version: "1.3.2" }
|
|
89
|
-
}, a = {
|
|
90
|
-
AMap: r.notload,
|
|
91
|
-
AMapUI: r.notload,
|
|
92
|
-
Loca: r.notload
|
|
93
|
-
}, o = {
|
|
94
|
-
AMap: [],
|
|
95
|
-
AMapUI: [],
|
|
96
|
-
Loca: []
|
|
97
|
-
}, s = [], c = function(e) {
|
|
98
|
-
typeof e == "function" && (a.AMap === r.loaded ? e(window.AMap) : s.push(e));
|
|
99
|
-
};
|
|
100
|
-
return {
|
|
101
|
-
load: function(t) {
|
|
102
|
-
return new Promise(function(n, o) {
|
|
103
|
-
if (a.AMap == r.failed) o("");
|
|
104
|
-
else if (a.AMap == r.notload) {
|
|
105
|
-
var l = t.key, u = t.version, d = t.plugins;
|
|
106
|
-
l ? (window.AMap && location.host !== "lbs.amap.com" && o("禁止多种API加载方式混用"), i.key = l, i.AMap.version = u || i.AMap.version, i.AMap.plugins = d || i.AMap.plugins, a.AMap = r.loading, u = document.body || document.head, window.___onAPILoaded = function(i) {
|
|
107
|
-
if (delete window.___onAPILoaded, i) a.AMap = r.failed, o(i);
|
|
108
|
-
else for (a.AMap = r.loaded, e(t).then(function() {
|
|
109
|
-
n(window.AMap);
|
|
110
|
-
}).catch(o); s.length;) s.splice(0, 1)[0]();
|
|
111
|
-
}, d = document.createElement("script"), d.type = "text/javascript", d.src = "https://webapi.amap.com/maps?callback=___onAPILoaded&v=" + i.AMap.version + "&key=" + l + "&plugin=" + i.AMap.plugins.join(","), d.onerror = function(e) {
|
|
112
|
-
a.AMap = r.failed, o(e);
|
|
113
|
-
}, u.appendChild(d)) : o("请填写key");
|
|
114
|
-
} else if (a.AMap == r.loaded) {
|
|
115
|
-
if (t.key && t.key !== i.key) o("多个不一致的 key");
|
|
116
|
-
else if (t.version && t.version !== i.AMap.version) o("不允许多个版本 JSAPI 混用");
|
|
117
|
-
else {
|
|
118
|
-
if (l = [], t.plugins) for (u = 0; u < t.plugins.length; u += 1) i.AMap.plugins.indexOf(t.plugins[u]) == -1 && l.push(t.plugins[u]);
|
|
119
|
-
l.length ? window.AMap.plugin(l, function() {
|
|
120
|
-
e(t).then(function() {
|
|
121
|
-
n(window.AMap);
|
|
122
|
-
}).catch(o);
|
|
123
|
-
}) : e(t).then(function() {
|
|
124
|
-
n(window.AMap);
|
|
125
|
-
}).catch(o);
|
|
126
|
-
}
|
|
127
|
-
} else if (t.key && t.key !== i.key) o("多个不一致的 key");
|
|
128
|
-
else if (t.version && t.version !== i.AMap.version) o("不允许多个版本 JSAPI 混用");
|
|
129
|
-
else {
|
|
130
|
-
var f = [];
|
|
131
|
-
if (t.plugins) for (u = 0; u < t.plugins.length; u += 1) i.AMap.plugins.indexOf(t.plugins[u]) == -1 && f.push(t.plugins[u]);
|
|
132
|
-
c(function() {
|
|
133
|
-
f.length ? window.AMap.plugin(f, function() {
|
|
134
|
-
e(t).then(function() {
|
|
135
|
-
n(window.AMap);
|
|
136
|
-
}).catch(o);
|
|
137
|
-
}) : e(t).then(function() {
|
|
138
|
-
n(window.AMap);
|
|
139
|
-
}).catch(o);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
reset: function() {
|
|
145
|
-
delete window.AMap, delete window.AMapUI, delete window.Loca, i = {
|
|
146
|
-
key: "",
|
|
147
|
-
AMap: {
|
|
148
|
-
version: "1.4.15",
|
|
149
|
-
plugins: []
|
|
150
|
-
},
|
|
151
|
-
AMapUI: {
|
|
152
|
-
version: "1.1",
|
|
153
|
-
plugins: []
|
|
154
|
-
},
|
|
155
|
-
Loca: { version: "1.3.2" }
|
|
156
|
-
}, a = {
|
|
157
|
-
AMap: r.notload,
|
|
158
|
-
AMapUI: r.notload,
|
|
159
|
-
Loca: r.notload
|
|
160
|
-
}, o = {
|
|
161
|
-
AMap: [],
|
|
162
|
-
AMapUI: [],
|
|
163
|
-
Loca: []
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
});
|
|
168
|
-
})))(), 1), C = { class: "search-box" }, w = /* @__PURE__ */ u({
|
|
6
|
+
var C = { class: "search-box" }, w = /* @__PURE__ */ u({
|
|
169
7
|
__name: "map",
|
|
170
8
|
props: {
|
|
171
9
|
isFullscreen: { type: Boolean },
|
|
172
10
|
modelValue: {},
|
|
173
11
|
mapKey: {},
|
|
174
|
-
|
|
12
|
+
mapSecurityKey: {}
|
|
175
13
|
},
|
|
176
14
|
emits: ["update:modelValue"],
|
|
177
15
|
setup(e, { expose: t, emit: n }) {
|
|
178
|
-
let
|
|
16
|
+
let i = e, a = n, c = _(null), u = h(""), d = h([]), v = r({
|
|
179
17
|
get() {
|
|
180
|
-
return
|
|
18
|
+
return i.modelValue || {};
|
|
181
19
|
},
|
|
182
20
|
set(e) {
|
|
183
21
|
a("update:modelValue", e);
|
|
@@ -185,15 +23,16 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
185
23
|
});
|
|
186
24
|
b(() => v.value, (e) => {
|
|
187
25
|
e.longitude && e.latitude && j(e);
|
|
188
|
-
}, { deep: !0 }), b(() =>
|
|
26
|
+
}, { deep: !0 }), b(() => i.isFullscreen, () => {
|
|
189
27
|
setTimeout(() => {
|
|
190
|
-
|
|
28
|
+
c.value?.resize();
|
|
191
29
|
}, 100);
|
|
192
30
|
});
|
|
193
31
|
let y, w, T, E;
|
|
194
32
|
function D() {
|
|
195
|
-
|
|
196
|
-
|
|
33
|
+
let e = i.mapSecurityKey || "f4b453739d9bbfaeedb62f53dcf4c436";
|
|
34
|
+
e && typeof window < "u" && (window._AMapSecurityConfig = { securityJsCode: e }), S.load({
|
|
35
|
+
key: i.mapKey || "43046d94499dc85dec81037e5ac14ee9",
|
|
197
36
|
version: "2.0",
|
|
198
37
|
plugins: [
|
|
199
38
|
"AMap.ToolBar",
|
|
@@ -203,7 +42,7 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
203
42
|
"AMap.Geocoder"
|
|
204
43
|
]
|
|
205
44
|
}).then((e) => {
|
|
206
|
-
w = e,
|
|
45
|
+
w = e, c.value = new e.Map("mapcontainer"), v.value.longitude && v.value.latitude && j(v.value), e.plugin([
|
|
207
46
|
"AMap.ToolBar",
|
|
208
47
|
"AMap.Scale",
|
|
209
48
|
"AMap.Geolocation",
|
|
@@ -217,24 +56,24 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
217
56
|
buttonOffset: new e.Pixel(10, 20),
|
|
218
57
|
zoomToAccuracy: !0
|
|
219
58
|
});
|
|
220
|
-
E = new e.Geocoder({ city: "全国" }),
|
|
221
|
-
map:
|
|
59
|
+
E = new e.Geocoder({ city: "全国" }), c.value.addControl(r), c.value.addControl(t), c.value.addControl(n), y = new e.PlaceSearch({
|
|
60
|
+
map: c.value,
|
|
222
61
|
city: "",
|
|
223
62
|
pageSize: 30,
|
|
224
63
|
pageIndex: 1,
|
|
225
64
|
citylimit: !1,
|
|
226
65
|
autoFitView: !0
|
|
66
|
+
}), c.value.on("click", k), e.Event.addListener(y, "markerClick", function(e) {
|
|
67
|
+
let t = { ...v.value };
|
|
68
|
+
t.longitude = e.data.location.lng, t.latitude = e.data.location.lat, t.name = e.data.name, a("update:modelValue", t);
|
|
227
69
|
});
|
|
228
|
-
}), e.Event.addListener(y, "markerClick", function(e) {
|
|
229
|
-
let t = { ...v.value };
|
|
230
|
-
t.longitude = e.data.location.lng, t.latitude = e.data.location.lat, t.name = e.data.name, a("update:modelValue", t);
|
|
231
70
|
});
|
|
232
71
|
});
|
|
233
72
|
}
|
|
234
73
|
p(() => {
|
|
235
74
|
D(), setTimeout(() => {
|
|
236
75
|
let { longitude: e, latitude: t } = v.value;
|
|
237
|
-
e && t &&
|
|
76
|
+
e && t && c.value && c.value.setZoomAndCenter(16, [e, t]);
|
|
238
77
|
}, 500);
|
|
239
78
|
});
|
|
240
79
|
function O(e) {
|
|
@@ -254,8 +93,12 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
254
93
|
});
|
|
255
94
|
}
|
|
256
95
|
function k(e) {
|
|
96
|
+
if (!E) return;
|
|
257
97
|
let { lng: t, lat: n } = e.lnglat;
|
|
258
|
-
|
|
98
|
+
a("update:modelValue", {
|
|
99
|
+
longitude: t,
|
|
100
|
+
latitude: n
|
|
101
|
+
}), E.getAddress([t, n], (e, r) => {
|
|
259
102
|
if (e === "complete" && r.info === "OK") {
|
|
260
103
|
let { addressComponent: e, formattedAddress: i } = r.regeocode, { city: o, province: s, district: c } = e;
|
|
261
104
|
o ||= s, a("update:modelValue", {
|
|
@@ -272,45 +115,45 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
272
115
|
});
|
|
273
116
|
}
|
|
274
117
|
function A(e, t) {
|
|
275
|
-
let n = t, { pname: r, cityname: i, adname:
|
|
118
|
+
let n = t, { pname: r, cityname: i, adname: o, address: s, name: l } = n, { lng: u, lat: d } = n.location;
|
|
276
119
|
a("update:modelValue", {
|
|
277
120
|
longitude: u,
|
|
278
121
|
latitude: d,
|
|
279
|
-
address:
|
|
122
|
+
address: s,
|
|
280
123
|
zone: [
|
|
281
124
|
r,
|
|
282
125
|
i,
|
|
283
|
-
|
|
126
|
+
o
|
|
284
127
|
],
|
|
285
128
|
name: l
|
|
286
|
-
}),
|
|
129
|
+
}), c.value.setZoomAndCenter(16, [u, d]);
|
|
287
130
|
}
|
|
288
131
|
function j(e = v.value) {
|
|
289
132
|
let { longitude: t, latitude: n } = e;
|
|
290
133
|
!t || !n || (T && T.setMap(null), T = new w.Marker({
|
|
291
134
|
position: new w.LngLat(t, n),
|
|
292
135
|
anchor: "bottom-center"
|
|
293
|
-
}),
|
|
136
|
+
}), c.value.add(T));
|
|
294
137
|
}
|
|
295
138
|
function M() {
|
|
296
|
-
|
|
139
|
+
c.value?.resize();
|
|
297
140
|
}
|
|
298
141
|
function N() {
|
|
299
142
|
let { longitude: e, latitude: t } = v.value;
|
|
300
|
-
e && t &&
|
|
143
|
+
e && t && c.value && (c.value.setZoomAndCenter(16, [e, t]), j());
|
|
301
144
|
}
|
|
302
145
|
return t({
|
|
303
146
|
resize: M,
|
|
304
147
|
setCenter: N
|
|
305
148
|
}), (t, n) => {
|
|
306
149
|
let r = g("a-input"), i = g("a-auto-complete");
|
|
307
|
-
return m(),
|
|
150
|
+
return m(), o("div", {
|
|
308
151
|
class: "me-input-gps__map",
|
|
309
152
|
style: f({
|
|
310
153
|
height: e.isFullscreen ? "100%" : "400px",
|
|
311
154
|
width: "100%"
|
|
312
155
|
})
|
|
313
|
-
}, [n[3] ||=
|
|
156
|
+
}, [n[3] ||= s("div", { id: "mapcontainer" }, null, -1), s("div", C, [
|
|
314
157
|
l(i, {
|
|
315
158
|
value: u.value,
|
|
316
159
|
"onUpdate:value": n[0] ||= (e) => u.value = e,
|
|
@@ -352,58 +195,67 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
352
195
|
name: "MeInputGps",
|
|
353
196
|
__name: "index",
|
|
354
197
|
props: {
|
|
198
|
+
modelValue: {},
|
|
355
199
|
latitude: {},
|
|
356
200
|
longitude: {},
|
|
357
201
|
address: {},
|
|
358
202
|
mapKey: {},
|
|
359
|
-
|
|
203
|
+
mapSecurityKey: {},
|
|
360
204
|
placeholder: { default: "请选择位置" },
|
|
361
205
|
disabled: {
|
|
362
206
|
type: Boolean,
|
|
363
207
|
default: !1
|
|
364
208
|
}
|
|
365
209
|
},
|
|
366
|
-
emits: ["confirm"],
|
|
367
|
-
setup(
|
|
368
|
-
let
|
|
369
|
-
|
|
370
|
-
|
|
210
|
+
emits: ["update:modelValue", "confirm"],
|
|
211
|
+
setup(s, { emit: u }) {
|
|
212
|
+
let f = s, _ = u, S = r(() => f.modelValue && Object.keys(f.modelValue).length ? f.modelValue : {
|
|
213
|
+
latitude: f.latitude,
|
|
214
|
+
longitude: f.longitude,
|
|
215
|
+
address: f.address
|
|
216
|
+
}), C = h({}), D = h(!1), O = h(!1), k = h(null), A = r(() => C.value.latitude ? `经度:${C.value.longitude},纬度:${C.value.latitude}` : ""), j = r(() => f.mapKey || "43046d94499dc85dec81037e5ac14ee9"), M = r(() => f.mapSecurityKey || "f4b453739d9bbfaeedb62f53dcf4c436"), N = () => {
|
|
217
|
+
f.disabled || (D.value = !0);
|
|
218
|
+
}, P = h(!1), F = () => {
|
|
371
219
|
let e = {
|
|
372
|
-
latitude:
|
|
373
|
-
longitude:
|
|
374
|
-
address:
|
|
220
|
+
latitude: C.value.latitude || "",
|
|
221
|
+
longitude: C.value.longitude || "",
|
|
222
|
+
address: C.value.address || ""
|
|
375
223
|
};
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
|
|
224
|
+
P.value = !0, _("update:modelValue", { ...e }), _("confirm", { ...e }), D.value = !1;
|
|
225
|
+
}, I = (e) => {
|
|
226
|
+
O.value = e;
|
|
379
227
|
};
|
|
380
|
-
return b(
|
|
228
|
+
return b(D, (e) => {
|
|
381
229
|
e && d(() => {
|
|
382
230
|
setTimeout(() => {
|
|
383
|
-
|
|
231
|
+
k.value?.resize(), k.value?.setCenter();
|
|
384
232
|
}, 300);
|
|
385
233
|
});
|
|
234
|
+
}), b(D, (e) => {
|
|
235
|
+
e || (P.value ? P.value = !1 : C.value = { ...S.value });
|
|
236
|
+
}), b(S, (e) => {
|
|
237
|
+
D.value || (C.value = { ...e });
|
|
386
238
|
}), p(() => {
|
|
387
|
-
|
|
388
|
-
}), (
|
|
389
|
-
let
|
|
390
|
-
return m(),
|
|
391
|
-
l(
|
|
392
|
-
default: x(() => [l(
|
|
393
|
-
value:
|
|
394
|
-
placeholder:
|
|
395
|
-
disabled:
|
|
239
|
+
C.value = { ...S.value };
|
|
240
|
+
}), (r, u) => {
|
|
241
|
+
let d = g("a-input"), f = g("a-button"), p = g("a-space-compact");
|
|
242
|
+
return m(), o("div", T, [
|
|
243
|
+
l(p, { style: { width: "100%" } }, {
|
|
244
|
+
default: x(() => [l(d, {
|
|
245
|
+
value: A.value,
|
|
246
|
+
placeholder: s.placeholder,
|
|
247
|
+
disabled: s.disabled,
|
|
396
248
|
readonly: "",
|
|
397
249
|
class: "me-input-gps__input"
|
|
398
250
|
}, null, 8, [
|
|
399
251
|
"value",
|
|
400
252
|
"placeholder",
|
|
401
253
|
"disabled"
|
|
402
|
-
]), l(
|
|
403
|
-
disabled:
|
|
404
|
-
onClick:
|
|
254
|
+
]), l(f, {
|
|
255
|
+
disabled: s.disabled,
|
|
256
|
+
onClick: N
|
|
405
257
|
}, {
|
|
406
|
-
default: x(() => [l(y(
|
|
258
|
+
default: x(() => [l(y(e), {
|
|
407
259
|
name: "MapPin",
|
|
408
260
|
size: 16
|
|
409
261
|
})]),
|
|
@@ -411,30 +263,30 @@ var S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
411
263
|
}, 8, ["disabled"])]),
|
|
412
264
|
_: 1
|
|
413
265
|
}),
|
|
414
|
-
|
|
415
|
-
l(y(
|
|
416
|
-
open:
|
|
417
|
-
"onUpdate:open":
|
|
266
|
+
C.value?.latitude ? (m(), o("div", E, [C.value.address ? (m(), o(n, { key: 0 }, [c(" 位置:" + v(C.value.address), 1)], 64)) : (m(), o(n, { key: 1 }, [c(" 位置:经度 " + v(C.value.longitude) + ",纬度 " + v(C.value.latitude), 1)], 64))])) : a("", !0),
|
|
267
|
+
l(y(t), {
|
|
268
|
+
open: D.value,
|
|
269
|
+
"onUpdate:open": u[1] ||= (e) => D.value = e,
|
|
418
270
|
title: "选择位置",
|
|
419
271
|
width: 800,
|
|
420
|
-
onFullscreenChange:
|
|
421
|
-
onOk:
|
|
272
|
+
onFullscreenChange: I,
|
|
273
|
+
onOk: F
|
|
422
274
|
}, {
|
|
423
|
-
default: x(() => [
|
|
275
|
+
default: x(() => [D.value && j.value ? (m(), i(w, {
|
|
424
276
|
key: 0,
|
|
425
277
|
ref_key: "mapRef",
|
|
426
|
-
ref:
|
|
427
|
-
"is-fullscreen":
|
|
428
|
-
modelValue:
|
|
429
|
-
"onUpdate:modelValue":
|
|
430
|
-
"map-key":
|
|
431
|
-
"security-
|
|
278
|
+
ref: k,
|
|
279
|
+
"is-fullscreen": O.value,
|
|
280
|
+
modelValue: C.value,
|
|
281
|
+
"onUpdate:modelValue": u[0] ||= (e) => C.value = e,
|
|
282
|
+
"map-key": j.value,
|
|
283
|
+
"map-security-key": M.value
|
|
432
284
|
}, null, 8, [
|
|
433
285
|
"is-fullscreen",
|
|
434
286
|
"modelValue",
|
|
435
287
|
"map-key",
|
|
436
|
-
"security-
|
|
437
|
-
])) :
|
|
288
|
+
"map-security-key"
|
|
289
|
+
])) : a("", !0)]),
|
|
438
290
|
_: 1
|
|
439
291
|
}, 8, ["open"])
|
|
440
292
|
]);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { MeInputGpsProps } from './types';
|
|
1
|
+
import { MeInputGpsProps, GpsCoord } from './types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<MeInputGpsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:modelValue": (value: GpsCoord) => any;
|
|
3
4
|
confirm: (data: {
|
|
4
5
|
latitude: number | string;
|
|
5
6
|
longitude: number | string;
|
|
6
7
|
address: string;
|
|
7
8
|
}) => any;
|
|
8
9
|
}, string, import('vue').PublicProps, Readonly<MeInputGpsProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: GpsCoord) => any) | undefined;
|
|
9
11
|
onConfirm?: ((data: {
|
|
10
12
|
latitude: number | string;
|
|
11
13
|
longitude: number | string;
|
|
@@ -16,16 +16,18 @@ export interface GpsCoord {
|
|
|
16
16
|
}
|
|
17
17
|
/** MeInputGps Props */
|
|
18
18
|
export interface MeInputGpsProps {
|
|
19
|
-
/**
|
|
19
|
+
/** v-model 绑定的坐标对象(优先于单独的 latitude/longitude/address) */
|
|
20
|
+
modelValue?: GpsCoord;
|
|
21
|
+
/** 纬度(未使用 modelValue 时的回退) */
|
|
20
22
|
latitude?: number | string;
|
|
21
23
|
/** 经度 */
|
|
22
24
|
longitude?: number | string;
|
|
23
25
|
/** 地址 */
|
|
24
26
|
address?: string;
|
|
25
|
-
/** 高德地图 Web 端 Key */
|
|
26
|
-
mapKey
|
|
27
|
-
/**
|
|
28
|
-
|
|
27
|
+
/** 高德地图 Web 端 Key(可不传,默认读取 .env 的 VITE_AMAP_KEY) */
|
|
28
|
+
mapKey?: string;
|
|
29
|
+
/** 高德地图安全密钥(可不传,默认读取 .env 的 VITE_AMAP_SECURITY_KEY;控制台开启「安全密钥」加密方式时通常需要) */
|
|
30
|
+
mapSecurityKey?: string;
|
|
29
31
|
/** 输入框占位符 */
|
|
30
32
|
placeholder?: string;
|
|
31
33
|
/** 是否禁用 */
|
|
@@ -33,6 +35,8 @@ export interface MeInputGpsProps {
|
|
|
33
35
|
}
|
|
34
36
|
/** MeInputGps Events */
|
|
35
37
|
export interface MeInputGpsEmits {
|
|
38
|
+
/** 更新 v-model 绑定的坐标 */
|
|
39
|
+
(e: 'update:modelValue', value: GpsCoord): void;
|
|
36
40
|
/** 确认选择位置 */
|
|
37
41
|
(e: 'confirm', data: {
|
|
38
42
|
latitude: number | string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/input-icon-selector-
|
|
1
|
+
import { n as e, t } from "../chunks/input-icon-selector-BrrR4KK6.js";
|
|
2
2
|
export { e as MeInputIconSelector, t as default };
|
|
@@ -13,9 +13,9 @@ declare const __VLS_base: import('vue').DefineComponent<MeInputIconSelectorProps
|
|
|
13
13
|
size: "large" | "middle" | "small";
|
|
14
14
|
iconfontPrefix: string;
|
|
15
15
|
iconfontMode: "class" | "symbol";
|
|
16
|
+
modelValue: string;
|
|
16
17
|
placeholder: string;
|
|
17
18
|
disabled: boolean;
|
|
18
|
-
modelValue: string;
|
|
19
19
|
sources: MeInputIconSelectorSource[];
|
|
20
20
|
iconfontData: string[];
|
|
21
21
|
searchPlaceholder: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.me-load-json{display:inline-block}.me-load-json__editor{flex-direction:column;flex:1;width:100%;height:100%;min-height:400px;display:flex}.me-load-json__editor .editor{flex:1;width:100%;height:100%;min-height:0}.me-load-json-modal .ant-modal-body{flex-direction:column;min-height:400px;padding:0;display:flex}.me-load-json-modal .ant-modal-content{flex-direction:column;height:100%;display:flex}.me-load-json-modal .ant-modal{height:80vh;max-height:80vh}.me-load-json-modal.me-modal-wrap--fullscreen .ant-modal{height:100vh;max-height:100vh;padding-bottom:0;top:0}.me-load-json-modal.me-modal-wrap--fullscreen .ant-modal-body{flex:1;min-height:0}
|