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