@me-framework/me-ui-antdv-next 0.0.26 → 0.0.29

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.
Files changed (60) hide show
  1. package/dist/chunks/input-icon-selector-BrrR4KK6.js +228 -0
  2. package/dist/chunks/modal-D4Tl-Qzk.js +166 -0
  3. package/dist/chunks/skeleton-D1-aYUPf.js +135 -0
  4. package/dist/icon/index.js +1 -1
  5. package/dist/index.d.ts +3 -1
  6. package/dist/input-gps/index.js +85 -233
  7. package/dist/input-gps/index.vue.d.ts +4 -2
  8. package/dist/input-gps/map.vue.d.ts +1 -1
  9. package/dist/input-gps/types.d.ts +9 -5
  10. package/dist/input-icon-selector/index.js +1 -1
  11. package/dist/input-icon-selector/index.vue.d.ts +1 -1
  12. package/dist/input-property/index.css +1 -0
  13. package/dist/input-property/index.d.ts +5 -0
  14. package/dist/input-property/index.js +269 -0
  15. package/dist/input-property/index.vue.d.ts +18 -0
  16. package/dist/input-property/types.d.ts +38 -0
  17. package/dist/input-property/validate.d.ts +18 -0
  18. package/dist/load-json/index.css +1 -0
  19. package/dist/load-json/index.js +91 -24319
  20. package/dist/load-json/index.vue.d.ts +3 -3
  21. package/dist/me-ui-antdv-next.js +1791 -1551
  22. package/dist/me-ui-antdv-next.umd.cjs +2 -2
  23. package/dist/message/index.js +1 -1
  24. package/dist/message/index.vue.d.ts +1 -1
  25. package/dist/modal/index.css +1 -0
  26. package/dist/modal/index.js +7 -1
  27. package/dist/modal/index.vue.d.ts +26 -5
  28. package/dist/modal/types.d.ts +47 -7
  29. package/dist/nav/index.js +1 -1
  30. package/dist/nav/index.vue.d.ts +3 -3
  31. package/dist/resolver/index.d.ts +1 -1
  32. package/dist/resolver/index.js +9 -5
  33. package/dist/skeleton/index.js +5 -138
  34. package/dist/style.css +1 -1
  35. package/dist/tree-menu/TreeMenuEdit.vue.d.ts +1 -1
  36. package/dist/tree-menu/index.js +2 -2
  37. package/dist/tree-menu/index.vue.d.ts +1 -1
  38. package/package.json +6 -6
  39. package/dist/chunks/input-icon-selector-D5c45QL8.js +0 -227
  40. package/dist/chunks/modal-Dke8ng3P.js +0 -178
  41. package/dist/chunks/rolldown-runtime-DtPi1Y-2.js +0 -13
  42. package/dist/load-json.css +0 -1
  43. package/dist/modal.css +0 -1
  44. /package/dist/{base.css → base/index.css} +0 -0
  45. /package/dist/{body.css → body/index.css} +0 -0
  46. /package/dist/{box.css → box/index.css} +0 -0
  47. /package/dist/{breadcrumb.css → breadcrumb/index.css} +0 -0
  48. /package/dist/{card.css → card/index.css} +0 -0
  49. /package/dist/chunks/{icon-DdoH0MfT.js → icon-CXjgApCy.js} +0 -0
  50. /package/dist/chunks/{message-CPHX2tAR.js → message-D2zYiiQe.js} +0 -0
  51. /package/dist/{icon.css → icon/index.css} +0 -0
  52. /package/dist/{input-gps.css → input-gps/index.css} +0 -0
  53. /package/dist/{input-icon-selector.css → input-icon-selector/index.css} +0 -0
  54. /package/dist/{input-radio.css → input-radio/index.css} +0 -0
  55. /package/dist/{login-page.css → login-page/index.css} +0 -0
  56. /package/dist/{menu.css → menu/index.css} +0 -0
  57. /package/dist/{message.css → message/index.css} +0 -0
  58. /package/dist/{nav.css → nav/index.css} +0 -0
  59. /package/dist/{skeleton.css → skeleton/index.css} +0 -0
  60. /package/dist/{tree-menu.css → tree-menu/index.css} +0 -0
@@ -1,183 +1,21 @@
1
- import { n as e, t } from "../chunks/rolldown-runtime-DtPi1Y-2.js";
2
- import n from "../icon/index.js";
3
- import { t as r } from "../chunks/modal-Dke8ng3P.js";
4
- import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode 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";
5
- //#endregion
1
+ import e from "../icon/index.js";
2
+ import t from "../modal/index.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 S = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
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
- securityJsCode: {}
12
+ mapSecurityKey: {}
175
13
  },
176
14
  emits: ["update:modelValue"],
177
15
  setup(e, { expose: t, emit: n }) {
178
- let r = e, a = n, o = _(null), u = h(""), d = h([]), v = i({
16
+ let i = e, a = n, c = _(null), u = h(""), d = h([]), v = r({
179
17
  get() {
180
- return r.modelValue || {};
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(() => r.isFullscreen, () => {
26
+ }, { deep: !0 }), b(() => i.isFullscreen, () => {
189
27
  setTimeout(() => {
190
- o.value?.resize();
28
+ c.value?.resize();
191
29
  }, 100);
192
30
  });
193
31
  let y, w, T, E;
194
32
  function D() {
195
- r.securityJsCode && typeof window < "u" && (window._AMapSecurityConfig = { securityJsCode: r.securityJsCode }), S.default.load({
196
- key: r.mapKey || "",
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, o.value = new e.Map("mapcontainer"), o.value.on("click", k), v.value.longitude && v.value.latitude && j(v.value), e.plugin([
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: "全国" }), o.value.addControl(r), o.value.addControl(t), o.value.addControl(n), y = new e.PlaceSearch({
221
- map: o.value,
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 && o.value && o.value.setZoomAndCenter(16, [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
- E.getAddress([t, n], (e, r) => {
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: s, address: c, name: l } = n, { lng: u, lat: d } = n.location;
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: c,
122
+ address: s,
280
123
  zone: [
281
124
  r,
282
125
  i,
283
- s
126
+ o
284
127
  ],
285
128
  name: l
286
- }), o.value.setZoomAndCenter(16, [u, d]);
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
- }), o.value.add(T));
136
+ }), c.value.add(T));
294
137
  }
295
138
  function M() {
296
- o.value?.resize();
139
+ c.value?.resize();
297
140
  }
298
141
  function N() {
299
142
  let { longitude: e, latitude: t } = v.value;
300
- e && t && o.value && (o.value.setZoomAndCenter(16, [e, t]), j());
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(), s("div", {
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] ||= c("div", { id: "mapcontainer" }, null, -1), c("div", C, [
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
- securityJsCode: {},
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(e, { emit: t }) {
368
- let c = e, u = t, f = h({}), _ = h(!1), S = h(!1), C = h(null), D = i(() => f.value.latitude ? `经度:${f.value.longitude},纬度:${f.value.latitude}` : ""), O = i(() => c.mapKey), k = i(() => c.securityJsCode), A = () => {
369
- c.disabled || (_.value = !0);
370
- }, j = () => {
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: f.value.latitude || "",
373
- longitude: f.value.longitude || "",
374
- address: f.value.address || ""
220
+ latitude: C.value.latitude || "",
221
+ longitude: C.value.longitude || "",
222
+ address: C.value.address || ""
375
223
  };
376
- u("confirm", e), _.value = !1;
377
- }, M = (e) => {
378
- S.value = e;
224
+ P.value = !0, _("update:modelValue", { ...e }), _("confirm", { ...e }), D.value = !1;
225
+ }, I = (e) => {
226
+ O.value = e;
379
227
  };
380
- return b(_, (e) => {
228
+ return b(D, (e) => {
381
229
  e && d(() => {
382
230
  setTimeout(() => {
383
- C.value?.resize(), C.value?.setCenter();
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
- f.value.latitude = c.latitude, f.value.longitude = c.longitude, f.value.address = c.address;
388
- }), (t, i) => {
389
- let c = g("a-input"), u = g("a-button"), d = g("a-space-compact");
390
- return m(), s("div", T, [
391
- l(d, { style: { width: "100%" } }, {
392
- default: x(() => [l(c, {
393
- value: D.value,
394
- placeholder: e.placeholder,
395
- disabled: e.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(u, {
403
- disabled: e.disabled,
404
- onClick: A
254
+ ]), l(f, {
255
+ disabled: s.disabled,
256
+ onClick: N
405
257
  }, {
406
- default: x(() => [l(y(n), {
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
- f.value?.address ? (m(), s("div", E, " 位置:" + v(f.value.address), 1)) : o("", !0),
415
- l(y(r), {
416
- open: _.value,
417
- "onUpdate:open": i[1] ||= (e) => _.value = e,
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: M,
421
- onOk: j
272
+ onFullscreenChange: I,
273
+ onOk: F
422
274
  }, {
423
- default: x(() => [_.value && O.value ? (m(), a(w, {
275
+ default: x(() => [D.value && j.value ? (m(), i(w, {
424
276
  key: 0,
425
277
  ref_key: "mapRef",
426
- ref: C,
427
- "is-fullscreen": S.value,
428
- modelValue: f.value,
429
- "onUpdate:modelValue": i[0] ||= (e) => f.value = e,
430
- "map-key": O.value,
431
- "security-js-code": k.value
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-js-code"
437
- ])) : o("", !0)]),
288
+ "map-security-key"
289
+ ])) : a("", !0)]),
438
290
  _: 1
439
291
  }, 8, ["open"])
440
292
  ]);
@@ -1,19 +1,21 @@
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;
12
14
  address: string;
13
15
  }) => any) | undefined;
14
16
  }>, {
15
- placeholder: string;
16
17
  disabled: boolean;
18
+ placeholder: string;
17
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
20
  declare const _default: typeof __VLS_export;
19
21
  export default _default;
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  isFullscreen?: boolean;
4
4
  modelValue?: GpsCoord;
5
5
  mapKey?: string;
6
- securityJsCode?: string;
6
+ mapSecurityKey?: string;
7
7
  };
8
8
  /** 重新调整地图尺寸(容器尺寸变化后调用) */
9
9
  declare function resize(): void;
@@ -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: string;
27
- /** 高德地图安全密钥(JS API 2.0 必填,开启"加密方式"时使用) */
28
- securityJsCode?: string;
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-D5c45QL8.js";
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
- placeholder: string;
17
16
  disabled: boolean;
18
17
  modelValue: string;
18
+ placeholder: string;
19
19
  sources: MeInputIconSelectorSource[];
20
20
  iconfontData: string[];
21
21
  searchPlaceholder: string;
@@ -0,0 +1 @@
1
+ .me-input-property{width:100%;position:relative}.me-input-property__toolbar{justify-content:flex-end;margin-bottom:8px;display:flex}.me-input-property__add-btn{font-size:13px}.me-input-property__table{width:100%}.me-input-property__table .ant-table-row.me-input-property__row--ghost td{opacity:.4;background:#1677ff0a}.me-input-property__drop-line{background:var(--me-primary,#1677ff);pointer-events:none;z-index:9;border-radius:2px;height:2px;display:none;position:absolute;left:0;box-shadow:0 0 0 1px #fffc}.me-input-property__drag-fallback{opacity:.9;background:#fff;border:1px solid #d9d9d9;border-radius:6px;width:320px;display:table;box-shadow:0 4px 12px #00000026}.me-input-property__drag-fallback td{background:0 0;padding:8px 12px}.me-input-property__actions{align-items:center;gap:2px;display:inline-flex}.me-input-property__drag{cursor:grab;color:#999;border-radius:4px;justify-content:center;align-items:center;padding:2px;display:inline-flex}.me-input-property__drag:active{cursor:grabbing;color:var(--me-primary,#1677ff)}.me-input-property__drag:hover{color:var(--me-primary,#1677ff);background:#0000000a}.me-input-property__del{color:#999}.me-input-property__del:hover{color:#ff4d4f}
@@ -0,0 +1,5 @@
1
+ import { default as MeInputProperty } from './index.vue';
2
+ export { MeInputProperty };
3
+ export default MeInputProperty;
4
+ export * from './types';
5
+ export * from './validate';