ele-admin-plus 1.1.9-beta.4 → 1.1.9-beta.6

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 (65) hide show
  1. package/es/ele-app/el.d.ts +3 -0
  2. package/es/ele-basic-select/index.d.ts +1 -1
  3. package/es/ele-data-table/index.d.ts +1 -1
  4. package/es/ele-drawer/style/index.scss +1 -1
  5. package/es/ele-icon-select/index.d.ts +1 -1
  6. package/es/ele-map-picker/components/map-search.d.ts +22 -0
  7. package/es/ele-map-picker/components/map-search.js +75 -0
  8. package/es/ele-map-picker/components/map-view.d.ts +43 -24
  9. package/es/ele-map-picker/components/map-view.js +213 -189
  10. package/es/ele-map-picker/index.d.ts +33 -13
  11. package/es/ele-map-picker/index.js +21 -39
  12. package/es/ele-map-picker/props.d.ts +27 -5
  13. package/es/ele-map-picker/props.js +17 -5
  14. package/es/ele-map-picker/style/index.scss +195 -166
  15. package/es/ele-map-picker/types.d.ts +8 -4
  16. package/es/ele-menus/index.d.ts +2 -6
  17. package/es/ele-menus/props.d.ts +0 -2
  18. package/es/ele-menus/props.js +1 -3
  19. package/es/ele-modal/index.js +1 -1
  20. package/es/ele-modal/style/index.scss +1 -1
  21. package/es/ele-printer/style/index.scss +1 -1
  22. package/es/ele-pro-layout/style/tabs.scss +1 -1
  23. package/es/ele-pro-table/index.d.ts +1 -1
  24. package/es/ele-table-select/index.d.ts +3 -3
  25. package/es/ele-tooltip/index.d.ts +1 -1
  26. package/es/ele-tree-select/index.d.ts +1 -1
  27. package/es/ele-virtual-table/index.d.ts +1 -1
  28. package/es/lang/en_US.js +2 -1
  29. package/es/lang/zh_CN.js +2 -1
  30. package/es/lang/zh_TW.js +2 -1
  31. package/es/style/themes/default.scss +1 -1
  32. package/es/style/themes/rounded.scss +1 -1
  33. package/lib/ele-app/el.d.ts +3 -0
  34. package/lib/ele-basic-select/index.d.ts +1 -1
  35. package/lib/ele-data-table/index.d.ts +1 -1
  36. package/lib/ele-drawer/style/index.scss +1 -1
  37. package/lib/ele-icon-select/index.d.ts +1 -1
  38. package/lib/ele-map-picker/components/map-search.cjs +74 -0
  39. package/lib/ele-map-picker/components/map-search.d.ts +22 -0
  40. package/lib/ele-map-picker/components/map-view.cjs +210 -186
  41. package/lib/ele-map-picker/components/map-view.d.ts +43 -24
  42. package/lib/ele-map-picker/index.cjs +20 -38
  43. package/lib/ele-map-picker/index.d.ts +33 -13
  44. package/lib/ele-map-picker/props.cjs +17 -5
  45. package/lib/ele-map-picker/props.d.ts +27 -5
  46. package/lib/ele-map-picker/style/index.scss +195 -166
  47. package/lib/ele-map-picker/types.d.ts +8 -4
  48. package/lib/ele-menus/index.d.ts +2 -6
  49. package/lib/ele-menus/props.cjs +1 -3
  50. package/lib/ele-menus/props.d.ts +0 -2
  51. package/lib/ele-modal/index.cjs +1 -1
  52. package/lib/ele-modal/style/index.scss +1 -1
  53. package/lib/ele-printer/style/index.scss +1 -1
  54. package/lib/ele-pro-layout/style/tabs.scss +1 -1
  55. package/lib/ele-pro-table/index.d.ts +1 -1
  56. package/lib/ele-table-select/index.d.ts +3 -3
  57. package/lib/ele-tooltip/index.d.ts +1 -1
  58. package/lib/ele-tree-select/index.d.ts +1 -1
  59. package/lib/ele-virtual-table/index.d.ts +1 -1
  60. package/lib/lang/en_US.cjs +2 -1
  61. package/lib/lang/zh_CN.cjs +2 -1
  62. package/lib/lang/zh_TW.cjs +2 -1
  63. package/lib/style/themes/default.scss +1 -1
  64. package/lib/style/themes/rounded.scss +1 -1
  65. package/package.json +2 -2
@@ -3,15 +3,14 @@ const vue = require("vue");
3
3
  const AMapLoader = require("@amap/amap-jsapi-loader");
4
4
  const elementPlus = require("element-plus");
5
5
  const icons = require("../../icons");
6
- const receiver = require("../../ele-config-provider/receiver");
7
6
  const EleLoading = require("../../ele-loading/index");
7
+ const MapSearch = require("./map-search");
8
8
  const props = require("../props");
9
- const ICON_CLASS = "ele-map-view-main-icon";
9
+ const ICON_CLASS = "ele-map-view-body-icon";
10
10
  const _sfc_main = vue.defineComponent({
11
11
  name: "MapView",
12
12
  components: {
13
13
  EleLoading,
14
- ElAutocomplete: elementPlus.ElAutocomplete,
15
14
  ElInput: elementPlus.ElInput,
16
15
  ElButton: elementPlus.ElButton,
17
16
  ElIcon: elementPlus.ElIcon,
@@ -19,16 +18,15 @@ const _sfc_main = vue.defineComponent({
19
18
  PlusOutlined: icons.PlusOutlined,
20
19
  EnvironmentOutlined: icons.EnvironmentOutlined,
21
20
  CheckCircleOutlined: icons.CheckCircleOutlined,
22
- CheckOutlined: icons.CheckOutlined,
23
- SearchOutlined: icons.SearchOutlined
21
+ MapSearch
24
22
  },
25
23
  props: props.mapProps,
26
24
  emits: {
27
- done: (_result) => true,
28
- mapDone: (_ins) => true
25
+ mapDone: (_ins) => true,
26
+ select: (_selected) => true,
27
+ done: (_result) => true
29
28
  },
30
29
  setup(props2, { emit }) {
31
- const { authenticated } = receiver.useLicense();
32
30
  const mapRef = vue.ref(null);
33
31
  const loading = vue.ref(true);
34
32
  const poiLoading = vue.ref(false);
@@ -38,7 +36,9 @@ const _sfc_main = vue.defineComponent({
38
36
  const centerIconClass = vue.ref([ICON_CLASS]);
39
37
  const keywords = vue.ref("");
40
38
  const selected = vue.ref(null);
41
- const disabled = vue.computed(() => props2.required && !selected.value);
39
+ const confirmDisabled = vue.computed(() => props2.required && !selected.value);
40
+ const keywordMode = vue.computed(() => "keyword" === props2.mode);
41
+ const poiMode = vue.computed(() => "poi" === props2.mode);
42
42
  const state = {
43
43
  /** 上次输入建议关键字 */
44
44
  lastSuggestion: "",
@@ -85,17 +85,32 @@ const _sfc_main = vue.defineComponent({
85
85
  });
86
86
  state.mapIns.on("complete", () => {
87
87
  loading.value = false;
88
- const { lng, lat } = state.mapIns.getCenter();
89
- searchPOI(lng, lat);
88
+ if (poiMode.value || keywordMode.value) {
89
+ const { lng, lat } = state.mapIns.getCenter();
90
+ searchPOI(lng, lat);
91
+ }
90
92
  });
91
93
  state.mapIns.on("moveend", () => {
92
- if (state.isItemClickMove) {
94
+ if (state.isItemClickMove || !poiMode.value) {
93
95
  state.isItemClickMove = false;
94
- } else if (!props2.keywordMode) {
95
- bounceIcon();
96
- const { lng, lat } = state.mapIns.getCenter();
97
- searchPOI(lng, lat);
96
+ return;
98
97
  }
98
+ bounceIcon();
99
+ const { lng, lat } = state.mapIns.getCenter();
100
+ searchPOI(lng, lat);
101
+ });
102
+ state.mapIns.on("click", (e) => {
103
+ if (poiMode.value || keywordMode.value) {
104
+ return;
105
+ }
106
+ if (e.lnglat == null || typeof e.lnglat !== "object") {
107
+ console.error(e);
108
+ return;
109
+ }
110
+ const { lng, lat } = e.lnglat;
111
+ setSelected({ location: { lng, lat } });
112
+ setMapCenter(lng, lat, props2.selectedZoom);
113
+ showCenterMarker(lng, lat);
99
114
  });
100
115
  state.centerMarker = new AMap.Marker({
101
116
  icon: new AMap.Icon({
@@ -116,19 +131,19 @@ const _sfc_main = vue.defineComponent({
116
131
  return;
117
132
  }
118
133
  state.lastSuggestion = value;
119
- if (props2.keywordMode) {
134
+ if (keywordMode.value) {
120
135
  poiLoading.value = true;
121
136
  }
122
137
  searchKeywords(value).then((result) => {
123
- if (props2.keywordMode) {
138
+ if (keywordMode.value) {
124
139
  data.value = result;
125
- selected.value = null;
126
140
  poiLoading.value = false;
141
+ setSelected(null);
127
142
  removeCenterMarker();
128
- } else {
129
- suggestionData.value = result;
130
- callback && callback(suggestionData.value);
143
+ return;
131
144
  }
145
+ suggestionData.value = result;
146
+ callback && callback(suggestionData.value);
132
147
  }).catch((e) => {
133
148
  console.error(e);
134
149
  poiLoading.value = false;
@@ -139,28 +154,37 @@ const _sfc_main = vue.defineComponent({
139
154
  if (!item || !item.location) {
140
155
  return;
141
156
  }
142
- if (!data.value.length || data.value[0].name !== item.name) {
143
- data.value = [item, ...data.value];
144
- selected.value = item;
157
+ const { lng, lat } = item.location;
158
+ if (poiMode.value) {
159
+ if (!data.value.length || data.value[0].name !== item.name) {
160
+ data.value = [item, ...data.value];
161
+ }
162
+ setSelected(data.value[0]);
163
+ } else {
164
+ setSelected(item);
165
+ showCenterMarker(lng, lat);
145
166
  }
146
- setMapCenter(item.location.lng, item.location.lat, props2.selectedZoom);
167
+ setMapCenter(lng, lat, props2.selectedZoom);
147
168
  state.selectedSuggestion = item;
148
169
  };
149
170
  const onItemClick = (item) => {
150
171
  state.isItemClickMove = true;
151
- selected.value = item;
172
+ setSelected(item);
152
173
  const { lng, lat } = item.location;
153
174
  setMapCenter(lng, lat, props2.selectedZoom);
154
- if (!props2.keywordMode) {
175
+ if (poiMode.value) {
155
176
  bounceIcon();
156
- } else {
157
- showCenterMarker(lng, lat);
177
+ return;
158
178
  }
179
+ showCenterMarker(lng, lat);
159
180
  };
160
- const onConfirm = () => {
161
- if (!authenticated.value) {
162
- return;
181
+ const setSelected = (item) => {
182
+ if (selected.value !== item) {
183
+ selected.value = item;
184
+ emit("select", selected.value);
163
185
  }
186
+ };
187
+ const onConfirm = () => {
164
188
  if (!selected.value) {
165
189
  confirmLoading.value = true;
166
190
  getMapCenter(props2.returnRegions).then((result2) => {
@@ -175,7 +199,7 @@ const _sfc_main = vue.defineComponent({
175
199
  }
176
200
  const result = {
177
201
  ...selected.value.location,
178
- name: selected.value.name,
202
+ name: selected.value.name || "",
179
203
  address: selected.value.address || ""
180
204
  };
181
205
  if (props2.returnRegions) {
@@ -231,20 +255,20 @@ const _sfc_main = vue.defineComponent({
231
255
  if (state.selectedSuggestion) {
232
256
  if (result.length === 0 || result[0].name !== state.selectedSuggestion.name) {
233
257
  data.value = [state.selectedSuggestion, ...result];
234
- selected.value = state.selectedSuggestion;
235
258
  } else {
236
259
  data.value = result;
237
- selected.value = result[0];
238
260
  }
261
+ setSelected(data.value[0]);
239
262
  } else {
240
263
  data.value = result;
241
- selected.value = null;
264
+ setSelected(null);
242
265
  }
243
266
  poiLoading.value = false;
244
267
  }).catch((e) => {
245
268
  console.error(e);
246
- data.value = [];
247
- selected.value = null;
269
+ const selectedSuggestion = state.selectedSuggestion;
270
+ data.value = selectedSuggestion ? [selectedSuggestion] : [];
271
+ setSelected(selectedSuggestion ? selectedSuggestion : null);
248
272
  poiLoading.value = false;
249
273
  });
250
274
  };
@@ -333,16 +357,16 @@ const _sfc_main = vue.defineComponent({
333
357
  }
334
358
  });
335
359
  };
336
- const changeMapStyle = (value) => {
360
+ const changeMapStyle = (style) => {
337
361
  if (state.mapIns) {
338
- if (typeof value === "boolean") {
339
- if (value) {
362
+ if (typeof style === "boolean") {
363
+ if (style) {
340
364
  state.mapIns.setMapStyle("amap://styles/dark");
341
365
  } else {
342
366
  state.mapIns.setMapStyle("amap://styles/normal");
343
367
  }
344
- } else if (value) {
345
- state.mapIns.setMapStyle(value);
368
+ } else if (style) {
369
+ state.mapIns.setMapStyle(style);
346
370
  }
347
371
  }
348
372
  };
@@ -355,13 +379,13 @@ const _sfc_main = vue.defineComponent({
355
379
  };
356
380
  const destroyAll = () => {
357
381
  destroyMap();
358
- data.value = [];
359
- suggestionData.value = [];
360
- selected.value = null;
361
- keywords.value = "";
362
382
  state.lastSuggestion = "";
363
383
  state.selectedSuggestion = null;
364
384
  state.isItemClickMove = false;
385
+ data.value = [];
386
+ suggestionData.value = [];
387
+ keywords.value = "";
388
+ setSelected(null);
365
389
  };
366
390
  const getMapIns = () => {
367
391
  return state.mapIns;
@@ -383,14 +407,14 @@ const _sfc_main = vue.defineComponent({
383
407
  }
384
408
  );
385
409
  vue.watch(
386
- () => props2.keywordMode,
387
- (keywordMode) => {
410
+ () => props2.mode,
411
+ (mode) => {
388
412
  keywords.value = "";
389
413
  suggestionData.value = [];
390
414
  state.selectedSuggestion = null;
391
415
  state.lastSuggestion = "";
392
416
  removeCenterMarker();
393
- if (keywordMode && selected.value) {
417
+ if (mode !== "poi" && selected.value) {
394
418
  const { lng, lat } = selected.value.location;
395
419
  showCenterMarker(lng, lat);
396
420
  }
@@ -410,6 +434,7 @@ const _sfc_main = vue.defineComponent({
410
434
  destroyAll();
411
435
  });
412
436
  return {
437
+ SearchOutlined: icons.SearchOutlined,
413
438
  mapRef,
414
439
  loading,
415
440
  poiLoading,
@@ -419,7 +444,9 @@ const _sfc_main = vue.defineComponent({
419
444
  centerIconClass,
420
445
  keywords,
421
446
  selected,
422
- disabled,
447
+ confirmDisabled,
448
+ keywordMode,
449
+ poiMode,
423
450
  onSearch,
424
451
  onSearchSelect,
425
452
  onItemClick,
@@ -435,173 +462,170 @@ const _export_sfc = (sfc, props2) => {
435
462
  }
436
463
  return target;
437
464
  };
438
- const _hoisted_1 = { class: "ele-map-view-search" };
439
- const _hoisted_2 = { class: "ele-map-suggest-title" };
440
- const _hoisted_3 = { class: "ele-map-suggest-text" };
441
- const _hoisted_4 = { class: "ele-map-view-main" };
442
- const _hoisted_5 = ["src"];
465
+ const _hoisted_1 = { class: "ele-map-view-body" };
466
+ const _hoisted_2 = {
467
+ ref: "mapRef",
468
+ style: { "height": "100%" }
469
+ };
470
+ const _hoisted_3 = ["src"];
471
+ const _hoisted_4 = {
472
+ key: 0,
473
+ class: "ele-map-view-search"
474
+ };
475
+ const _hoisted_5 = {
476
+ key: 1,
477
+ class: "ele-map-view-message"
478
+ };
443
479
  const _hoisted_6 = { class: "ele-map-view-list" };
444
480
  const _hoisted_7 = ["onClick"];
445
- const _hoisted_8 = { class: "ele-map-view-item-title" };
446
- const _hoisted_9 = {
481
+ const _hoisted_8 = { class: "ele-map-view-item-body" };
482
+ const _hoisted_9 = { class: "ele-map-view-item-title" };
483
+ const _hoisted_10 = {
447
484
  key: 0,
448
485
  class: "ele-map-view-item-text"
449
486
  };
450
- const _hoisted_10 = {
487
+ const _hoisted_11 = {
451
488
  key: 0,
452
489
  class: "ele-map-view-empty"
453
490
  };
454
- const _hoisted_11 = {
491
+ const _hoisted_12 = { class: "ele-map-view-extra" };
492
+ const _hoisted_13 = {
455
493
  key: 0,
456
- class: "ele-map-view-extra"
494
+ class: "ele-map-view-message"
457
495
  };
458
- const _hoisted_12 = { class: "ele-map-view-message" };
459
496
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
460
- const _component_SearchOutlined = vue.resolveComponent("SearchOutlined");
497
+ const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
461
498
  const _component_ElIcon = vue.resolveComponent("ElIcon");
462
- const _component_ElInput = vue.resolveComponent("ElInput");
463
- const _component_ElAutocomplete = vue.resolveComponent("ElAutocomplete");
464
- const _component_CheckOutlined = vue.resolveComponent("CheckOutlined");
499
+ const _component_MapSearch = vue.resolveComponent("MapSearch");
465
500
  const _component_ElButton = vue.resolveComponent("ElButton");
466
- const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
501
+ const _component_ElInput = vue.resolveComponent("ElInput");
467
502
  const _component_EnvironmentOutlined = vue.resolveComponent("EnvironmentOutlined");
468
503
  const _component_CheckCircleOutlined = vue.resolveComponent("CheckCircleOutlined");
469
504
  const _component_ElEmpty = vue.resolveComponent("ElEmpty");
470
505
  const _component_EleLoading = vue.resolveComponent("EleLoading");
471
506
  return vue.openBlock(), vue.createBlock(_component_EleLoading, {
472
507
  loading: _ctx.loading,
473
- class: "ele-map-view"
508
+ class: "ele-map-view",
509
+ style: vue.normalizeStyle({ height: _ctx.height })
474
510
  }, {
475
511
  default: vue.withCtx(() => [
476
- vue.createElementVNode("div", {
477
- class: "ele-map-view-header",
478
- style: vue.normalizeStyle(_ctx.headerStyle)
479
- }, [
480
- vue.createElementVNode("div", _hoisted_1, [
481
- _ctx.keywordMode ? (vue.openBlock(), vue.createBlock(_component_ElInput, {
482
- key: 0,
483
- clearable: "",
484
- modelValue: _ctx.keywords,
485
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keywords = $event),
486
- placeholder: _ctx.searchPlaceholder,
487
- onChange: _ctx.onSearch
488
- }, {
489
- prefix: vue.withCtx(() => [
490
- vue.createVNode(_component_ElIcon, { class: "el-input__icon" }, {
491
- default: vue.withCtx(() => [
492
- vue.createVNode(_component_SearchOutlined)
493
- ]),
494
- _: 1
495
- })
512
+ vue.createElementVNode("div", _hoisted_1, [
513
+ vue.createElementVNode("div", _hoisted_2, null, 512),
514
+ _ctx.poiMode ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
515
+ vue.createVNode(_component_ElIcon, { class: "ele-map-view-icon-plus" }, {
516
+ default: vue.withCtx(() => [
517
+ vue.createVNode(_component_PlusOutlined)
496
518
  ]),
497
519
  _: 1
498
- }, 8, ["modelValue", "placeholder", "onChange"])) : (vue.openBlock(), vue.createBlock(_component_ElAutocomplete, {
499
- key: 1,
500
- clearable: "",
501
- modelValue: _ctx.keywords,
502
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.keywords = $event),
503
- fetchSuggestions: _ctx.onSearch,
504
- placeholder: _ctx.searchPlaceholder,
505
- onSelect: _ctx.onSearchSelect
520
+ }),
521
+ vue.createElementVNode("img", {
522
+ src: _ctx.markerSrc,
523
+ class: vue.normalizeClass(_ctx.centerIconClass)
524
+ }, null, 10, _hoisted_3)
525
+ ], 64)) : vue.createCommentVNode("", true),
526
+ !_ctx.poiMode && !_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
527
+ _ctx.filterable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
528
+ vue.createVNode(_component_MapSearch, {
529
+ modelValue: _ctx.keywords,
530
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keywords = $event),
531
+ placeholder: _ctx.searchPlaceholder,
532
+ onSearch: _ctx.onSearch,
533
+ onSearchSelect: _ctx.onSearchSelect
534
+ }, null, 8, ["modelValue", "placeholder", "onSearch", "onSearchSelect"])
535
+ ])) : vue.createCommentVNode("", true),
536
+ _ctx.confirmDisabled && _ctx.clickMessage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, vue.toDisplayString(_ctx.clickMessage), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
537
+ key: 2,
538
+ type: "primary",
539
+ loading: _ctx.confirmLoading,
540
+ disabled: _ctx.confirmDisabled,
541
+ class: "ele-map-view-btn-ok",
542
+ onClick: _ctx.onConfirm
506
543
  }, {
507
- prefix: vue.withCtx(() => [
508
- vue.createVNode(_component_ElIcon, { class: "el-input__icon" }, {
509
- default: vue.withCtx(() => [
510
- vue.createVNode(_component_SearchOutlined)
511
- ]),
512
- _: 1
513
- })
514
- ]),
515
- default: vue.withCtx(({ item }) => [
516
- vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(item.label), 1),
517
- vue.createElementVNode("span", _hoisted_3, "(" + vue.toDisplayString(item.district) + ")", 1)
544
+ default: vue.withCtx(() => [
545
+ vue.createTextVNode(vue.toDisplayString(_ctx.okText), 1)
518
546
  ]),
519
547
  _: 1
520
- }, 8, ["modelValue", "fetchSuggestions", "placeholder", "onSelect"]))
521
- ]),
522
- vue.createVNode(_component_ElButton, {
523
- type: "primary",
524
- disabled: _ctx.disabled,
525
- loading: _ctx.confirmLoading,
526
- class: "ele-map-view-btn-ok",
527
- onClick: _ctx.onConfirm
528
- }, {
529
- default: vue.withCtx(() => [
530
- vue.createVNode(_component_ElIcon, null, {
531
- default: vue.withCtx(() => [
532
- vue.createVNode(_component_CheckOutlined)
533
- ]),
534
- _: 1
535
- }),
536
- vue.createElementVNode("span", null, vue.toDisplayString(_ctx.okText), 1)
548
+ }, 8, ["loading", "disabled", "onClick"]))
549
+ ], 64)) : vue.createCommentVNode("", true)
550
+ ]),
551
+ _ctx.keywordMode || _ctx.poiMode ? (vue.openBlock(), vue.createBlock(_component_EleLoading, {
552
+ key: 0,
553
+ loading: _ctx.poiLoading,
554
+ class: "ele-map-view-side"
555
+ }, {
556
+ default: vue.withCtx(() => [
557
+ _ctx.keywordMode || _ctx.filterable ? (vue.openBlock(), vue.createElementBlock("div", {
558
+ key: 0,
559
+ class: "ele-map-view-search",
560
+ style: vue.normalizeStyle(_ctx.headerStyle)
561
+ }, [
562
+ _ctx.keywordMode ? (vue.openBlock(), vue.createBlock(_component_ElInput, {
563
+ key: 0,
564
+ clearable: true,
565
+ modelValue: _ctx.keywords,
566
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.keywords = $event),
567
+ prefixIcon: _ctx.SearchOutlined,
568
+ placeholder: _ctx.searchPlaceholder,
569
+ onChange: _ctx.onSearch
570
+ }, null, 8, ["modelValue", "prefixIcon", "placeholder", "onChange"])) : (vue.openBlock(), vue.createBlock(_component_MapSearch, {
571
+ key: 1,
572
+ modelValue: _ctx.keywords,
573
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.keywords = $event),
574
+ placeholder: _ctx.searchPlaceholder,
575
+ onSearch: _ctx.onSearch,
576
+ onSearchSelect: _ctx.onSearchSelect
577
+ }, null, 8, ["modelValue", "placeholder", "onSearch", "onSearchSelect"]))
578
+ ], 4)) : vue.createCommentVNode("", true),
579
+ vue.createElementVNode("div", _hoisted_6, [
580
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data, (item) => {
581
+ return vue.openBlock(), vue.createElementBlock("div", {
582
+ key: item.key,
583
+ class: vue.normalizeClass(["ele-map-view-item", { "is-active": item === _ctx.selected }]),
584
+ onClick: ($event) => _ctx.onItemClick(item)
585
+ }, [
586
+ vue.createVNode(_component_ElIcon, { class: "ele-map-view-item-icon" }, {
587
+ default: vue.withCtx(() => [
588
+ vue.createVNode(_component_EnvironmentOutlined)
589
+ ]),
590
+ _: 1
591
+ }),
592
+ vue.createElementVNode("div", _hoisted_8, [
593
+ vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(item.name), 1),
594
+ item.address ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, vue.toDisplayString(item.address), 1)) : vue.createCommentVNode("", true)
595
+ ]),
596
+ vue.createVNode(_component_ElIcon, { class: "ele-map-view-item-radio" }, {
597
+ default: vue.withCtx(() => [
598
+ vue.createVNode(_component_CheckCircleOutlined)
599
+ ]),
600
+ _: 1
601
+ })
602
+ ], 10, _hoisted_7);
603
+ }), 128)),
604
+ !_ctx.data || !_ctx.data.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
605
+ vue.createVNode(_component_ElEmpty, vue.mergeProps({ imageSize: 80 }, _ctx.emptyProps), null, 16)
606
+ ])) : vue.createCommentVNode("", true)
537
607
  ]),
538
- _: 1
539
- }, 8, ["disabled", "loading", "onClick"])
540
- ], 4),
541
- vue.createElementVNode("div", {
542
- class: "ele-map-view-body",
543
- style: vue.normalizeStyle({ height: _ctx.height })
544
- }, [
545
- vue.createElementVNode("div", _hoisted_4, [
546
- vue.createElementVNode("div", {
547
- ref: "mapRef",
548
- style: vue.normalizeStyle({ height: _ctx.height })
549
- }, null, 4),
550
- !_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
551
- vue.createVNode(_component_ElIcon, { class: "ele-map-view-icon-plus" }, {
608
+ vue.createElementVNode("div", _hoisted_12, [
609
+ _ctx.confirmDisabled && _ctx.message ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
610
+ key: 1,
611
+ type: "primary",
612
+ loading: _ctx.confirmLoading,
613
+ disabled: _ctx.confirmDisabled,
614
+ class: "ele-map-view-btn-ok",
615
+ onClick: _ctx.onConfirm
616
+ }, {
552
617
  default: vue.withCtx(() => [
553
- vue.createVNode(_component_PlusOutlined)
618
+ vue.createTextVNode(vue.toDisplayString(_ctx.okText), 1)
554
619
  ]),
555
620
  _: 1
556
- }),
557
- vue.createElementVNode("img", {
558
- src: _ctx.markerSrc,
559
- class: vue.normalizeClass(_ctx.centerIconClass)
560
- }, null, 10, _hoisted_5)
561
- ], 64)) : vue.createCommentVNode("", true)
621
+ }, 8, ["loading", "disabled", "onClick"]))
622
+ ])
562
623
  ]),
563
- vue.createVNode(_component_EleLoading, {
564
- loading: _ctx.poiLoading,
565
- class: "ele-map-view-side"
566
- }, {
567
- default: vue.withCtx(() => [
568
- vue.createElementVNode("div", _hoisted_6, [
569
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data, (item) => {
570
- return vue.openBlock(), vue.createElementBlock("div", {
571
- key: item.key,
572
- class: vue.normalizeClass(["ele-map-view-item", { "is-active": item === _ctx.selected }]),
573
- onClick: ($event) => _ctx.onItemClick(item)
574
- }, [
575
- vue.createVNode(_component_ElIcon, { class: "ele-map-view-item-icon" }, {
576
- default: vue.withCtx(() => [
577
- vue.createVNode(_component_EnvironmentOutlined)
578
- ]),
579
- _: 1
580
- }),
581
- vue.createElementVNode("div", _hoisted_8, vue.toDisplayString(item.name), 1),
582
- item.address ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, vue.toDisplayString(item.address), 1)) : vue.createCommentVNode("", true),
583
- vue.createVNode(_component_ElIcon, { class: "ele-map-view-item-radio" }, {
584
- default: vue.withCtx(() => [
585
- vue.createVNode(_component_CheckCircleOutlined)
586
- ]),
587
- _: 1
588
- })
589
- ], 10, _hoisted_7);
590
- }), 128)),
591
- !_ctx.data || !_ctx.data.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
592
- vue.createVNode(_component_ElEmpty, vue.mergeProps({ imageSize: 80 }, _ctx.emptyProps), null, 16)
593
- ])) : vue.createCommentVNode("", true)
594
- ]),
595
- _ctx.disabled ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
596
- vue.createElementVNode("div", _hoisted_12, vue.toDisplayString(_ctx.message), 1)
597
- ])) : vue.createCommentVNode("", true)
598
- ]),
599
- _: 1
600
- }, 8, ["loading"])
601
- ], 4)
624
+ _: 1
625
+ }, 8, ["loading"])) : vue.createCommentVNode("", true)
602
626
  ]),
603
627
  _: 1
604
- }, 8, ["loading"]);
628
+ }, 8, ["loading", "style"]);
605
629
  }
606
630
  const mapView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
607
631
  module.exports = mapView;