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