vue-openlayers-plugin 1.0.90 → 1.0.92
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/lib/{BasemapPanel-cba3afd6.mjs → BasemapPanel-a7640f57.mjs} +69 -22
- package/lib/{CoordinateLocationDialog-6e8a5f24.mjs → CoordinateLocationDialog-3fd9613f.mjs} +106 -51
- package/lib/{FilterPanel-9a8e2aca.mjs → FilterPanel-53958140.mjs} +1 -1
- package/lib/{MapPrintDialog-03c0823b.mjs → LayerPanel-02152994.mjs} +1 -1
- package/lib/{LayerPanel-be35370b.mjs → MapPrintDialog-bbf1ccc1.mjs} +1 -1
- package/lib/{MeasurementDialog-7fce097a.mjs → MeasurementDialog-4ffa44ae.mjs} +85 -33
- package/lib/{MyMarkersDialog-7dd24d9a.mjs → MyMarkersDialog-605a60e2.mjs} +139 -63
- package/lib/{RegionNavigationDialog-0808549f.mjs → RegionNavigationDialog-b0b6f86b.mjs} +30 -26
- package/lib/{ViewBookmarksDialog-60c9e851.mjs → ViewBookmarksDialog-475f44f3.mjs} +251 -92
- package/lib/{index-b3c7ea8d.mjs → index-30b0d26c.mjs} +1 -1
- package/lib/{index-05da77ba.mjs → index-7f38e279.mjs} +3361 -1919
- package/lib/{index-7aae577e.mjs → index-ecd9c14c.mjs} +14 -17
- package/lib/{index.es-e4a6ccb9.mjs → index.es-d464d539.mjs} +1 -1
- package/lib/index.esm.js +63 -63
- package/lib/index.umd.js +3956 -2128
- package/lib/style.css +707 -633
- package/package.json +2 -2
- package/types/src/components/CustomDialog/CustomDialog.vue.d.ts +11 -11
- package/types/src/components/CustomDialog/CustomDialog.vue.d.ts.map +1 -1
- package/types/src/components/CustomDialog/dialogCache.d.ts.map +1 -1
- package/types/src/components/CustomDialog/icons/index.d.ts.map +1 -1
- package/types/src/components/CustomDialog/index.d.ts.map +1 -1
- package/types/src/components/OlBaseLayerSwitcher.vue.d.ts.map +1 -1
- package/types/src/components/OlControlPanel.vue.d.ts +2 -2
- package/types/src/components/OlControlPanel.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/BasemapPanel.vue.d.ts +1 -1
- package/types/src/components/OlDialogs/BasemapPanel.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/CoordinateLocationDialog.vue.d.ts +1 -1
- package/types/src/components/OlDialogs/CoordinateLocationDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/DialogManager.d.ts +1 -1
- package/types/src/components/OlDialogs/DialogManager.d.ts.map +1 -1
- package/types/src/components/OlDialogs/FilterPanel.vue.d.ts +3 -3
- package/types/src/components/OlDialogs/FilterPanel.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/LayerPanel.vue.d.ts +786 -786
- package/types/src/components/OlDialogs/LayerPanel.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/LayerStyleConfig.vue.d.ts +3 -3
- package/types/src/components/OlDialogs/LayerStyleConfig.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/LayerTreeNode.vue.d.ts +5 -5
- package/types/src/components/OlDialogs/LayerTreeNode.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/MapDrawingDialog/index.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/MapPrintDialog.vue.d.ts +2 -2
- package/types/src/components/OlDialogs/MapPrintDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/MeasurementDialog.vue.d.ts +1 -1
- package/types/src/components/OlDialogs/MeasurementDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/MyMarkersDialog.vue.d.ts +2 -2
- package/types/src/components/OlDialogs/MyMarkersDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/RegionNavigationDialog.vue.d.ts +5 -5
- package/types/src/components/OlDialogs/RegionNavigationDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/ViewBookmarksDialog.vue.d.ts +2 -2
- package/types/src/components/OlDialogs/ViewBookmarksDialog.vue.d.ts.map +1 -1
- package/types/src/components/OlDialogs/registry.d.ts.map +1 -1
- package/types/src/components/OlDrawToolbar.vue.d.ts +16 -16
- package/types/src/components/OlDrawToolbar.vue.d.ts.map +1 -1
- package/types/src/components/OlLegendPanel.vue.d.ts +1 -1
- package/types/src/components/OlLegendPanel.vue.d.ts.map +1 -1
- package/types/src/components/OlMapContainer.vue.d.ts +31 -31
- package/types/src/components/OlMapContainer.vue.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/ArrayPopup.vue.d.ts +4 -4
- package/types/src/components/OlMapPopup/ArrayPopup.vue.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/BasePopup.vue.d.ts +6 -6
- package/types/src/components/OlMapPopup/BasePopup.vue.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/HtmlPopup.vue.d.ts +3 -3
- package/types/src/components/OlMapPopup/HtmlPopup.vue.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/ImagePopup.vue.d.ts +3 -3
- package/types/src/components/OlMapPopup/ImagePopup.vue.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/index.d.ts +1 -1
- package/types/src/components/OlMapPopup/index.d.ts.map +1 -1
- package/types/src/components/OlMapPopup/types.d.ts +12 -12
- package/types/src/components/OlMapPopup/types.d.ts.map +1 -1
- package/types/src/components/OlMapSearch.vue.d.ts +3 -3
- package/types/src/components/OlMapSearch.vue.d.ts.map +1 -1
- package/types/src/components/OlMapTooltip.vue.d.ts +8 -8
- package/types/src/components/OlMapTooltip.vue.d.ts.map +1 -1
- package/types/src/components/SvgIcon/index.vue.d.ts.map +1 -1
- package/types/src/core/EventBus.d.ts.map +1 -1
- package/types/src/core/EventManager.d.ts.map +1 -1
- package/types/src/core/FeatureHighlightManager.d.ts.map +1 -1
- package/types/src/core/GlobalStyleManager.d.ts +1 -1
- package/types/src/core/LayerConfigManager.d.ts.map +1 -1
- package/types/src/core/LayerManager.d.ts +2 -2
- package/types/src/core/LayerManager.d.ts.map +1 -1
- package/types/src/core/LayerTreeManager.d.ts +1 -1
- package/types/src/core/LayerTreeManager.d.ts.map +1 -1
- package/types/src/core/MapManager.d.ts +15 -15
- package/types/src/core/MapManager.d.ts.map +1 -1
- package/types/src/core/MarkerDrawingAdapter.d.ts.map +1 -1
- package/types/src/core/PluginManager.d.ts +1 -1
- package/types/src/core/PluginManager.d.ts.map +1 -1
- package/types/src/core/PopupManager.d.ts.map +1 -1
- package/types/src/core/SearchMarkerManager.d.ts.map +1 -1
- package/types/src/core/TooltipHelper.d.ts +1 -1
- package/types/src/core/TooltipHelper.d.ts.map +1 -1
- package/types/src/core/amapSearchApi.d.ts.map +1 -1
- package/types/src/core/configLoader.d.ts +33 -33
- package/types/src/core/configLoader.d.ts.map +1 -1
- package/types/src/core/drawing/BaseDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/DrawingManager.d.ts.map +1 -1
- package/types/src/core/drawing/IconDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/ImageDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/LineDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/MilitaryDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/MultiLineStringDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/MultiPointDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/MultiPolygonDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/PointDrawing.d.ts +2 -2
- package/types/src/core/drawing/PointDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/PointWithTextDrawing.d.ts +2 -2
- package/types/src/core/drawing/PointWithTextDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/PolygonDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/TextDrawing.d.ts.map +1 -1
- package/types/src/core/drawing/index.d.ts +12 -12
- package/types/src/core/drawing/index.d.ts.map +1 -1
- package/types/src/core/geoJsonLocationTool.d.ts +3 -3
- package/types/src/core/geoJsonLocationTool.d.ts.map +1 -1
- package/types/src/core/layers/BaseLayer.d.ts +1 -1
- package/types/src/core/layers/BaseLayer.d.ts.map +1 -1
- package/types/src/core/layers/CanvasLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/ClusterLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/GMLLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/GeoJSONLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/HeatmapLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/ImageVectorLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/KMLLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/LayerFactory.d.ts.map +1 -1
- package/types/src/core/layers/SuperMapServiceTester.d.ts.map +1 -1
- package/types/src/core/layers/SuperMapTiledMapServiceHandler.d.ts.map +1 -1
- package/types/src/core/layers/TiandituConfigHelper.d.ts.map +1 -1
- package/types/src/core/layers/TiandituLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/TileLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/TileSuperMapRestHandler.d.ts +1 -1
- package/types/src/core/layers/TileSuperMapRestHandler.d.ts.map +1 -1
- package/types/src/core/layers/VectorTileLayerHandler.d.ts +3 -3
- package/types/src/core/layers/VectorTileLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/WFSLayerHandler.d.ts +1 -1
- package/types/src/core/layers/WFSLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/WKTLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/WMSLayerHandler.d.ts +1 -1
- package/types/src/core/layers/WMSLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/WMTSLayerHandler.d.ts.map +1 -1
- package/types/src/core/layers/interfaces.d.ts +1 -1
- package/types/src/core/layers/interfaces.d.ts.map +1 -1
- package/types/src/core/mapOperationTool.d.ts.map +1 -1
- package/types/src/core/measurementTool.d.ts.map +1 -1
- package/types/src/core/overviewMapUtil.d.ts.map +1 -1
- package/types/src/core/proxyHelper.d.ts +1 -1
- package/types/src/core/proxyHelper.d.ts.map +1 -1
- package/types/src/core/storage.d.ts.map +1 -1
- package/types/src/core/styles/StyleFactory.d.ts.map +1 -1
- package/types/src/core/styles/StyleManager.d.ts.map +1 -1
- package/types/src/core/styles/index.d.ts +1 -1
- package/types/src/core/styles/index.d.ts.map +1 -1
- package/types/src/core/styles/interfaces.d.ts +3 -3
- package/types/src/core/styles/interfaces.d.ts.map +1 -1
- package/types/src/core/tiandituSearchApi.d.ts.map +1 -1
- package/types/src/hooks/useMap.d.ts.map +1 -1
- package/types/src/services/searchService.d.ts +2 -2
- package/types/src/services/searchService.d.ts.map +1 -1
- package/types/src/style.d.ts.map +1 -1
- package/types/src/types/map.d.ts +75 -0
- package/types/src/types/map.d.ts.map +1 -1
- package/types/src/utils/DiffusionAnimationHelper.d.ts.map +1 -1
- package/types/src/utils/GifAnimationHelper.d.ts.map +1 -1
- package/types/src/utils/coordinateTransform.d.ts.map +1 -1
- package/types/src/utils/html2pdf.d.ts +3 -0
- package/types/src/utils/html2pdf.d.ts.map +1 -1
- package/types/src/utils/index.d.ts +1 -1
- package/types/src/utils/index.d.ts.map +1 -1
- package/types/src/utils/unitConverter.d.ts.map +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, unref, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { E as ElMessageBox } from "./index-
|
|
1
|
+
import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, unref, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { j as plus_default, k as folder_opened_default, m as download_default, n as delete_default, s as search_default, v as camera_default, w as view_default, q as edit_default, x as location_default, z as zoom_in_default, u as toLonLat, t as fromLonLat, E as ElMessage, y as getUid } from "./index-7f38e279.mjs";
|
|
3
|
+
import { E as ElMessageBox } from "./index-30b0d26c.mjs";
|
|
4
4
|
import "ol";
|
|
5
5
|
const _hoisted_1 = { class: "bookmarks-content" };
|
|
6
6
|
const _hoisted_2 = { class: "toolbar" };
|
|
@@ -8,26 +8,30 @@ const _hoisted_3 = { class: "search-filter" };
|
|
|
8
8
|
const _hoisted_4 = { class: "bookmarks-grid" };
|
|
9
9
|
const _hoisted_5 = ["onClick"];
|
|
10
10
|
const _hoisted_6 = { class: "bookmark-thumbnail" };
|
|
11
|
-
const _hoisted_7 =
|
|
12
|
-
const _hoisted_8 = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
11
|
+
const _hoisted_7 = ["src"];
|
|
12
|
+
const _hoisted_8 = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "thumbnail-placeholder"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_9 = { class: "bookmark-overlay" };
|
|
17
|
+
const _hoisted_10 = { class: "bookmark-info" };
|
|
18
|
+
const _hoisted_11 = { class: "bookmark-title" };
|
|
19
|
+
const _hoisted_12 = { class: "bookmark-meta" };
|
|
20
|
+
const _hoisted_13 = { class: "use-count" };
|
|
21
|
+
const _hoisted_14 = { class: "bookmark-description" };
|
|
22
|
+
const _hoisted_15 = { class: "bookmark-details" };
|
|
20
23
|
const _hoisted_16 = { class: "detail-item" };
|
|
21
|
-
const _hoisted_17 = { class: "
|
|
22
|
-
const _hoisted_18 = {
|
|
24
|
+
const _hoisted_17 = { class: "detail-item" };
|
|
25
|
+
const _hoisted_18 = { class: "bookmark-time" };
|
|
26
|
+
const _hoisted_19 = {
|
|
23
27
|
key: 0,
|
|
24
28
|
class: "empty-state"
|
|
25
29
|
};
|
|
26
|
-
const
|
|
30
|
+
const _hoisted_20 = {
|
|
27
31
|
key: 1,
|
|
28
32
|
class: "statistics"
|
|
29
33
|
};
|
|
30
|
-
const
|
|
34
|
+
const _hoisted_21 = { class: "dialog-footer" };
|
|
31
35
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
36
|
__name: "ViewBookmarksDialog",
|
|
33
37
|
props: {
|
|
@@ -37,6 +41,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
41
|
setup(__props, { emit: __emit }) {
|
|
38
42
|
const props = __props;
|
|
39
43
|
const emit = __emit;
|
|
44
|
+
const mapRef = inject("map");
|
|
45
|
+
const map = computed(() => mapRef == null ? void 0 : mapRef.value);
|
|
40
46
|
const dialogVisible = computed({
|
|
41
47
|
get: () => props.modelValue,
|
|
42
48
|
set: (value) => emit("update:modelValue", value)
|
|
@@ -77,8 +83,110 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
83
|
centerLon: 116.407526,
|
|
78
84
|
centerLat: 39.90403,
|
|
79
85
|
zoom: 10,
|
|
80
|
-
rotation: 0
|
|
86
|
+
rotation: 0,
|
|
87
|
+
thumbnail: "",
|
|
88
|
+
saveLayerState: true
|
|
81
89
|
});
|
|
90
|
+
const getLayerStates = () => {
|
|
91
|
+
if (!map.value)
|
|
92
|
+
return [];
|
|
93
|
+
const states = [];
|
|
94
|
+
const layers = map.value.getLayers().getArray();
|
|
95
|
+
const processLayer = (layer) => {
|
|
96
|
+
const id = layer.get("id") || getUid(layer).toString();
|
|
97
|
+
const title = layer.get("title") || layer.get("name") || "未命名图层";
|
|
98
|
+
states.push({
|
|
99
|
+
id,
|
|
100
|
+
visible: layer.getVisible(),
|
|
101
|
+
opacity: layer.getOpacity(),
|
|
102
|
+
title
|
|
103
|
+
});
|
|
104
|
+
if (layer.getLayers) {
|
|
105
|
+
layer.getLayers().forEach((child) => processLayer(child));
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
layers.forEach((layer) => processLayer(layer));
|
|
109
|
+
return states;
|
|
110
|
+
};
|
|
111
|
+
const mapManager = inject("mapManager");
|
|
112
|
+
inject("eventBus");
|
|
113
|
+
const layerEventBus = inject("layerEventBus");
|
|
114
|
+
const restoreLayerStates = (states) => {
|
|
115
|
+
if (!map.value || !states || states.length === 0)
|
|
116
|
+
return;
|
|
117
|
+
let restoredCount = 0;
|
|
118
|
+
const allLayers = [];
|
|
119
|
+
const collectLayers = (layers) => {
|
|
120
|
+
layers.forEach((layer) => {
|
|
121
|
+
allLayers.push(layer);
|
|
122
|
+
if (layer.getLayers) {
|
|
123
|
+
collectLayers(layer.getLayers().getArray());
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
collectLayers(map.value.getLayers().getArray());
|
|
128
|
+
states.forEach((state) => {
|
|
129
|
+
var _a, _b;
|
|
130
|
+
const layer = allLayers.find((l) => {
|
|
131
|
+
const id = l.get("id") || getUid(l).toString();
|
|
132
|
+
return id === state.id || state.title && l.get("title") === state.title;
|
|
133
|
+
});
|
|
134
|
+
if (layer) {
|
|
135
|
+
if (layer.getVisible() !== state.visible) {
|
|
136
|
+
layer.setVisible(state.visible);
|
|
137
|
+
const layerId = layer.get("id") || getUid(layer).toString();
|
|
138
|
+
const layerName = layer.get("name") || layer.get("title") || "未命名图层";
|
|
139
|
+
const layerType = layer.get("type") || "unknown";
|
|
140
|
+
if ((_a = mapManager == null ? void 0 : mapManager.value) == null ? void 0 : _a.layerManager) {
|
|
141
|
+
mapManager.value.layerManager.setLayerVisible(layerId, state.visible);
|
|
142
|
+
}
|
|
143
|
+
if (layerEventBus) {
|
|
144
|
+
layerEventBus.emit("layer-visibility-changed", {
|
|
145
|
+
layerId,
|
|
146
|
+
visible: state.visible,
|
|
147
|
+
layerName,
|
|
148
|
+
layerType
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (Math.abs(layer.getOpacity() - state.opacity) > 0.01) {
|
|
153
|
+
layer.setOpacity(state.opacity);
|
|
154
|
+
const layerId = layer.get("id") || getUid(layer).toString();
|
|
155
|
+
if ((_b = mapManager == null ? void 0 : mapManager.value) == null ? void 0 : _b.layerManager) {
|
|
156
|
+
mapManager.value.layerManager.setLayerOpacity(layerId, state.opacity);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
restoredCount++;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
if (restoredCount < states.length) {
|
|
163
|
+
console.warn(
|
|
164
|
+
`部分图层状态未恢复: 仅恢复 ${restoredCount}/${states.length} 个图层`
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const generateThumbnail = () => {
|
|
169
|
+
if (!map.value)
|
|
170
|
+
return "";
|
|
171
|
+
try {
|
|
172
|
+
const mapCanvas = map.value.getViewport().querySelector("canvas");
|
|
173
|
+
if (mapCanvas) {
|
|
174
|
+
const canvas = document.createElement("canvas");
|
|
175
|
+
const ctx = canvas.getContext("2d");
|
|
176
|
+
const width = 300;
|
|
177
|
+
const height = width * (mapCanvas.height / mapCanvas.width);
|
|
178
|
+
canvas.width = width;
|
|
179
|
+
canvas.height = height;
|
|
180
|
+
if (ctx) {
|
|
181
|
+
ctx.drawImage(mapCanvas, 0, 0, width, height);
|
|
182
|
+
return canvas.toDataURL("image/jpeg", 0.7);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error("生成缩略图失败:", error);
|
|
187
|
+
}
|
|
188
|
+
return "";
|
|
189
|
+
};
|
|
82
190
|
const categories = computed(() => {
|
|
83
191
|
const cats = [...new Set(bookmarks.value.map((b) => b.category))];
|
|
84
192
|
return cats.filter((cat) => cat);
|
|
@@ -92,7 +200,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
200
|
);
|
|
93
201
|
}
|
|
94
202
|
if (filterCategory.value) {
|
|
95
|
-
result = result.filter(
|
|
203
|
+
result = result.filter(
|
|
204
|
+
(bookmark) => bookmark.category === filterCategory.value
|
|
205
|
+
);
|
|
96
206
|
}
|
|
97
207
|
result.sort((a, b) => {
|
|
98
208
|
switch (sortBy.value) {
|
|
@@ -113,12 +223,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
223
|
return bookmarks.value.filter((bookmark) => bookmark.createTime >= today).length;
|
|
114
224
|
});
|
|
115
225
|
const totalUseCount = computed(() => {
|
|
116
|
-
return bookmarks.value.reduce(
|
|
226
|
+
return bookmarks.value.reduce(
|
|
227
|
+
(total, bookmark) => total + bookmark.useCount,
|
|
228
|
+
0
|
|
229
|
+
);
|
|
117
230
|
});
|
|
118
231
|
const handleSearch = () => {
|
|
119
232
|
};
|
|
120
233
|
const showAddBookmark = () => {
|
|
121
234
|
editingIndex.value = -1;
|
|
235
|
+
const thumbnail = generateThumbnail();
|
|
122
236
|
Object.assign(bookmarkForm, {
|
|
123
237
|
name: "",
|
|
124
238
|
category: "默认",
|
|
@@ -126,8 +240,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
240
|
centerLon: 116.407526,
|
|
127
241
|
centerLat: 39.90403,
|
|
128
242
|
zoom: 10,
|
|
129
|
-
rotation: 0
|
|
243
|
+
rotation: 0,
|
|
244
|
+
thumbnail,
|
|
245
|
+
saveLayerState: true
|
|
130
246
|
});
|
|
247
|
+
if (map.value) {
|
|
248
|
+
const view = map.value.getView();
|
|
249
|
+
const center = view.getCenter();
|
|
250
|
+
const zoom = view.getZoom();
|
|
251
|
+
const rotation = view.getRotation();
|
|
252
|
+
const projection = view.getProjection().getCode();
|
|
253
|
+
const lonLat = projection === "EPSG:4326" || projection === "EPSG:4490" ? center : toLonLat(center);
|
|
254
|
+
Object.assign(bookmarkForm, {
|
|
255
|
+
centerLon: lonLat[0],
|
|
256
|
+
centerLat: lonLat[1],
|
|
257
|
+
zoom,
|
|
258
|
+
rotation: rotation * 180 / Math.PI
|
|
259
|
+
// 转换为角度
|
|
260
|
+
});
|
|
261
|
+
}
|
|
131
262
|
showBookmarkForm.value = true;
|
|
132
263
|
};
|
|
133
264
|
const editBookmark = (bookmark, index) => {
|
|
@@ -139,7 +270,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
139
270
|
centerLon: bookmark.center[0],
|
|
140
271
|
centerLat: bookmark.center[1],
|
|
141
272
|
zoom: bookmark.zoom,
|
|
142
|
-
rotation: bookmark.rotation
|
|
273
|
+
rotation: bookmark.rotation,
|
|
274
|
+
thumbnail: bookmark.thumbnail || "",
|
|
275
|
+
saveLayerState: !!(bookmark.layerStates && bookmark.layerStates.length > 0)
|
|
143
276
|
});
|
|
144
277
|
showBookmarkForm.value = true;
|
|
145
278
|
};
|
|
@@ -148,16 +281,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
281
|
console.error("请输入书签名称");
|
|
149
282
|
return;
|
|
150
283
|
}
|
|
284
|
+
const layerStates = bookmarkForm.saveLayerState ? getLayerStates() : void 0;
|
|
151
285
|
const bookmarkData = {
|
|
152
286
|
id: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].id : Date.now().toString(),
|
|
153
287
|
name: bookmarkForm.name,
|
|
154
288
|
category: bookmarkForm.category || "默认",
|
|
155
289
|
description: bookmarkForm.description,
|
|
156
|
-
center: [
|
|
290
|
+
center: [
|
|
291
|
+
Number(bookmarkForm.centerLon),
|
|
292
|
+
Number(bookmarkForm.centerLat)
|
|
293
|
+
],
|
|
157
294
|
zoom: bookmarkForm.zoom,
|
|
158
295
|
rotation: bookmarkForm.rotation,
|
|
159
296
|
useCount: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].useCount : 0,
|
|
160
|
-
createTime: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].createTime : /* @__PURE__ */ new Date()
|
|
297
|
+
createTime: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].createTime : /* @__PURE__ */ new Date(),
|
|
298
|
+
thumbnail: bookmarkForm.thumbnail,
|
|
299
|
+
layerStates
|
|
161
300
|
};
|
|
162
301
|
if (editingIndex.value >= 0) {
|
|
163
302
|
bookmarks.value[editingIndex.value] = bookmarkData;
|
|
@@ -174,6 +313,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
313
|
};
|
|
175
314
|
const applyBookmark = (bookmark) => {
|
|
176
315
|
bookmark.useCount++;
|
|
316
|
+
if (map.value) {
|
|
317
|
+
const view = map.value.getView();
|
|
318
|
+
const projection = view.getProjection().getCode();
|
|
319
|
+
const center = projection === "EPSG:4326" || projection === "EPSG:4490" ? bookmark.center : fromLonLat(bookmark.center);
|
|
320
|
+
view.animate({
|
|
321
|
+
center,
|
|
322
|
+
zoom: bookmark.zoom,
|
|
323
|
+
rotation: bookmark.rotation * Math.PI / 180,
|
|
324
|
+
// 转换为弧度
|
|
325
|
+
duration: 1e3
|
|
326
|
+
});
|
|
327
|
+
if (bookmark.layerStates && bookmark.layerStates.length > 0) {
|
|
328
|
+
restoreLayerStates(bookmark.layerStates);
|
|
329
|
+
ElMessage.success(`已应用视角并恢复图层状态`);
|
|
330
|
+
} else {
|
|
331
|
+
ElMessage.success(`已应用视角`);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
177
334
|
emit("bookmark-action", {
|
|
178
335
|
action: "apply",
|
|
179
336
|
bookmark
|
|
@@ -181,15 +338,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
338
|
console.log(`已应用视角: ${bookmark.name}`);
|
|
182
339
|
};
|
|
183
340
|
const deleteBookmark = (index) => {
|
|
184
|
-
ElMessageBox.confirm(
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
cancelButtonText: "取消",
|
|
190
|
-
type: "warning"
|
|
191
|
-
}
|
|
192
|
-
).then(() => {
|
|
341
|
+
ElMessageBox.confirm("确定要删除这个书签吗?", "确认删除", {
|
|
342
|
+
confirmButtonText: "确定",
|
|
343
|
+
cancelButtonText: "取消",
|
|
344
|
+
type: "warning"
|
|
345
|
+
}).then(() => {
|
|
193
346
|
const bookmark = bookmarks.value[index];
|
|
194
347
|
bookmarks.value.splice(index, 1);
|
|
195
348
|
emit("bookmark-action", {
|
|
@@ -201,15 +354,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
201
354
|
});
|
|
202
355
|
};
|
|
203
356
|
const clearAllBookmarks = () => {
|
|
204
|
-
ElMessageBox.confirm(
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
cancelButtonText: "取消",
|
|
210
|
-
type: "warning"
|
|
211
|
-
}
|
|
212
|
-
).then(() => {
|
|
357
|
+
ElMessageBox.confirm("确定要清空所有书签吗?此操作不可恢复!", "确认清空", {
|
|
358
|
+
confirmButtonText: "确定",
|
|
359
|
+
cancelButtonText: "取消",
|
|
360
|
+
type: "warning"
|
|
361
|
+
}).then(() => {
|
|
213
362
|
bookmarks.value = [];
|
|
214
363
|
emit("bookmark-action", {
|
|
215
364
|
action: "clear"
|
|
@@ -285,7 +434,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285
434
|
const _component_el_col = resolveComponent("el-col");
|
|
286
435
|
const _component_el_row = resolveComponent("el-row");
|
|
287
436
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
288
|
-
const
|
|
437
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
289
438
|
const _component_el_form = resolveComponent("el-form");
|
|
290
439
|
const _component_EPlusDialog = resolveComponent("EPlusDialog");
|
|
291
440
|
return openBlock(), createBlock(_component_EPlusDialog, {
|
|
@@ -295,13 +444,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
444
|
width: "700px",
|
|
296
445
|
"before-close": handleClose,
|
|
297
446
|
"show-modal": false,
|
|
298
|
-
|
|
447
|
+
"modal-class": ["pointer-events-none"],
|
|
448
|
+
"cache-id": "bookmarks-dialog",
|
|
299
449
|
class: "bookmarks-dialog"
|
|
300
450
|
}, {
|
|
301
451
|
footer: withCtx(() => [
|
|
302
|
-
createElementVNode("div",
|
|
452
|
+
createElementVNode("div", _hoisted_21, [
|
|
303
453
|
createVNode(_component_el_button, { onClick: handleClose }, {
|
|
304
|
-
default: withCtx(() => [..._cache[
|
|
454
|
+
default: withCtx(() => [..._cache[24] || (_cache[24] = [
|
|
305
455
|
createTextVNode("关闭", -1)
|
|
306
456
|
])]),
|
|
307
457
|
_: 1
|
|
@@ -341,8 +491,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
341
491
|
}, 8, ["icon"]),
|
|
342
492
|
createVNode(_component_el_button, {
|
|
343
493
|
icon: unref(delete_default),
|
|
344
|
-
|
|
345
|
-
|
|
494
|
+
disabled: bookmarks.value.length === 0,
|
|
495
|
+
onClick: clearAllBookmarks
|
|
346
496
|
}, {
|
|
347
497
|
default: withCtx(() => [..._cache[16] || (_cache[16] = [
|
|
348
498
|
createTextVNode(" 清空全部 ", -1)
|
|
@@ -357,8 +507,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
357
507
|
placeholder: "搜索书签名称或描述...",
|
|
358
508
|
"prefix-icon": unref(search_default),
|
|
359
509
|
clearable: "",
|
|
360
|
-
|
|
361
|
-
|
|
510
|
+
style: { "width": "300px" },
|
|
511
|
+
onInput: handleSearch
|
|
362
512
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
363
513
|
createVNode(_component_el_select, {
|
|
364
514
|
modelValue: filterCategory.value,
|
|
@@ -413,7 +563,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
413
563
|
onClick: ($event) => applyBookmark(bookmark)
|
|
414
564
|
}, [
|
|
415
565
|
createElementVNode("div", _hoisted_6, [
|
|
416
|
-
|
|
566
|
+
bookmark.thumbnail ? (openBlock(), createElementBlock("img", {
|
|
567
|
+
key: 0,
|
|
568
|
+
src: bookmark.thumbnail,
|
|
569
|
+
class: "thumbnail-image"
|
|
570
|
+
}, null, 8, _hoisted_7)) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
417
571
|
createVNode(_component_el_icon, {
|
|
418
572
|
size: "40",
|
|
419
573
|
color: "#409eff"
|
|
@@ -423,8 +577,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
423
577
|
]),
|
|
424
578
|
_: 1
|
|
425
579
|
})
|
|
426
|
-
]),
|
|
427
|
-
createElementVNode("div",
|
|
580
|
+
])),
|
|
581
|
+
createElementVNode("div", _hoisted_9, [
|
|
428
582
|
createVNode(_component_el_button_group, null, {
|
|
429
583
|
default: withCtx(() => [
|
|
430
584
|
createVNode(_component_el_button, {
|
|
@@ -451,8 +605,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
451
605
|
createVNode(_component_el_button, {
|
|
452
606
|
size: "small",
|
|
453
607
|
icon: unref(delete_default),
|
|
454
|
-
|
|
455
|
-
|
|
608
|
+
class: "delete-btn",
|
|
609
|
+
onClick: withModifiers(($event) => deleteBookmark(index), ["stop"])
|
|
456
610
|
}, {
|
|
457
611
|
default: withCtx(() => [..._cache[19] || (_cache[19] = [
|
|
458
612
|
createTextVNode(" 删除 ", -1)
|
|
@@ -464,9 +618,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
464
618
|
}, 1024)
|
|
465
619
|
])
|
|
466
620
|
]),
|
|
467
|
-
createElementVNode("div",
|
|
468
|
-
createElementVNode("div",
|
|
469
|
-
createElementVNode("div",
|
|
621
|
+
createElementVNode("div", _hoisted_10, [
|
|
622
|
+
createElementVNode("div", _hoisted_11, toDisplayString(bookmark.name), 1),
|
|
623
|
+
createElementVNode("div", _hoisted_12, [
|
|
470
624
|
createVNode(_component_el_tag, {
|
|
471
625
|
size: "small",
|
|
472
626
|
type: "info"
|
|
@@ -476,11 +630,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
476
630
|
]),
|
|
477
631
|
_: 2
|
|
478
632
|
}, 1024),
|
|
479
|
-
createElementVNode("span",
|
|
633
|
+
createElementVNode("span", _hoisted_13, "使用 " + toDisplayString(bookmark.useCount) + " 次", 1)
|
|
480
634
|
]),
|
|
481
|
-
createElementVNode("div",
|
|
482
|
-
createElementVNode("div",
|
|
483
|
-
createElementVNode("span",
|
|
635
|
+
createElementVNode("div", _hoisted_14, toDisplayString(bookmark.description), 1),
|
|
636
|
+
createElementVNode("div", _hoisted_15, [
|
|
637
|
+
createElementVNode("span", _hoisted_16, [
|
|
484
638
|
createVNode(_component_el_icon, null, {
|
|
485
639
|
default: withCtx(() => [
|
|
486
640
|
createVNode(unref(location_default))
|
|
@@ -489,7 +643,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
489
643
|
}),
|
|
490
644
|
createTextVNode(" " + toDisplayString(bookmark.center[0].toFixed(4)) + ", " + toDisplayString(bookmark.center[1].toFixed(4)), 1)
|
|
491
645
|
]),
|
|
492
|
-
createElementVNode("span",
|
|
646
|
+
createElementVNode("span", _hoisted_17, [
|
|
493
647
|
createVNode(_component_el_icon, null, {
|
|
494
648
|
default: withCtx(() => [
|
|
495
649
|
createVNode(unref(zoom_in_default))
|
|
@@ -499,12 +653,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
499
653
|
createTextVNode(" 缩放: " + toDisplayString(bookmark.zoom), 1)
|
|
500
654
|
])
|
|
501
655
|
]),
|
|
502
|
-
createElementVNode("div",
|
|
656
|
+
createElementVNode("div", _hoisted_18, toDisplayString(formatTime(bookmark.createTime)), 1)
|
|
503
657
|
])
|
|
504
658
|
], 8, _hoisted_5);
|
|
505
659
|
}), 128))
|
|
506
660
|
]),
|
|
507
|
-
filteredBookmarks.value.length === 0 ? (openBlock(), createElementBlock("div",
|
|
661
|
+
filteredBookmarks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
508
662
|
createVNode(_component_el_empty, { description: "暂无书签" }, {
|
|
509
663
|
default: withCtx(() => [
|
|
510
664
|
createVNode(_component_el_button, {
|
|
@@ -520,7 +674,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
520
674
|
_: 1
|
|
521
675
|
})
|
|
522
676
|
])) : createCommentVNode("", true),
|
|
523
|
-
bookmarks.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
677
|
+
bookmarks.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_20, [
|
|
524
678
|
createVNode(_component_el_row, { gutter: 20 }, {
|
|
525
679
|
default: withCtx(() => [
|
|
526
680
|
createVNode(_component_el_col, { span: 6 }, {
|
|
@@ -569,14 +723,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
569
723
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => showBookmarkForm.value = $event),
|
|
570
724
|
title: editingIndex.value >= 0 ? "编辑书签" : "保存视角书签",
|
|
571
725
|
width: "450px",
|
|
572
|
-
|
|
726
|
+
"cache-id": "bookmark-form",
|
|
573
727
|
"show-modal": false
|
|
574
728
|
}, {
|
|
575
729
|
footer: withCtx(() => [
|
|
576
730
|
createVNode(_component_el_button, {
|
|
577
731
|
onClick: _cache[10] || (_cache[10] = ($event) => showBookmarkForm.value = false)
|
|
578
732
|
}, {
|
|
579
|
-
default: withCtx(() => [..._cache[
|
|
733
|
+
default: withCtx(() => [..._cache[22] || (_cache[22] = [
|
|
580
734
|
createTextVNode("取消", -1)
|
|
581
735
|
])]),
|
|
582
736
|
_: 1
|
|
@@ -585,7 +739,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
585
739
|
type: "primary",
|
|
586
740
|
onClick: saveBookmark
|
|
587
741
|
}, {
|
|
588
|
-
default: withCtx(() => [..._cache[
|
|
742
|
+
default: withCtx(() => [..._cache[23] || (_cache[23] = [
|
|
589
743
|
createTextVNode("保存", -1)
|
|
590
744
|
])]),
|
|
591
745
|
_: 1
|
|
@@ -648,27 +802,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
648
802
|
}),
|
|
649
803
|
createVNode(_component_el_form_item, { label: "中心点" }, {
|
|
650
804
|
default: withCtx(() => [
|
|
651
|
-
createVNode(_component_el_row, {
|
|
805
|
+
createVNode(_component_el_row, {
|
|
806
|
+
gutter: 10,
|
|
807
|
+
style: { "width": "100%", "margin": "0" }
|
|
808
|
+
}, {
|
|
652
809
|
default: withCtx(() => [
|
|
653
|
-
createVNode(_component_el_col, {
|
|
810
|
+
createVNode(_component_el_col, {
|
|
811
|
+
span: 12,
|
|
812
|
+
style: { "padding-left": "0" }
|
|
813
|
+
}, {
|
|
654
814
|
default: withCtx(() => [
|
|
655
815
|
createVNode(_component_el_input, {
|
|
656
816
|
modelValue: bookmarkForm.centerLon,
|
|
657
817
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => bookmarkForm.centerLon = $event),
|
|
658
|
-
|
|
659
|
-
step: "0.000001",
|
|
818
|
+
readonly: "",
|
|
660
819
|
placeholder: "经度"
|
|
661
820
|
}, null, 8, ["modelValue"])
|
|
662
821
|
]),
|
|
663
822
|
_: 1
|
|
664
823
|
}),
|
|
665
|
-
createVNode(_component_el_col, {
|
|
824
|
+
createVNode(_component_el_col, {
|
|
825
|
+
span: 12,
|
|
826
|
+
style: { "padding-right": "0" }
|
|
827
|
+
}, {
|
|
666
828
|
default: withCtx(() => [
|
|
667
829
|
createVNode(_component_el_input, {
|
|
668
830
|
modelValue: bookmarkForm.centerLat,
|
|
669
831
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => bookmarkForm.centerLat = $event),
|
|
670
|
-
|
|
671
|
-
step: "0.000001",
|
|
832
|
+
readonly: "",
|
|
672
833
|
placeholder: "纬度"
|
|
673
834
|
}, null, 8, ["modelValue"])
|
|
674
835
|
]),
|
|
@@ -680,29 +841,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
680
841
|
]),
|
|
681
842
|
_: 1
|
|
682
843
|
}),
|
|
683
|
-
createVNode(_component_el_form_item, { label: "
|
|
844
|
+
createVNode(_component_el_form_item, { label: "旋转角度" }, {
|
|
684
845
|
default: withCtx(() => [
|
|
685
|
-
createVNode(
|
|
686
|
-
modelValue: bookmarkForm.
|
|
687
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => bookmarkForm.
|
|
688
|
-
|
|
689
|
-
max: 20,
|
|
690
|
-
step: 0.1,
|
|
691
|
-
"show-input": ""
|
|
846
|
+
createVNode(_component_el_input, {
|
|
847
|
+
modelValue: bookmarkForm.rotation,
|
|
848
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => bookmarkForm.rotation = $event),
|
|
849
|
+
readonly: ""
|
|
692
850
|
}, null, 8, ["modelValue"])
|
|
693
851
|
]),
|
|
694
852
|
_: 1
|
|
695
853
|
}),
|
|
696
|
-
createVNode(_component_el_form_item,
|
|
854
|
+
createVNode(_component_el_form_item, null, {
|
|
697
855
|
default: withCtx(() => [
|
|
698
|
-
createVNode(
|
|
699
|
-
modelValue: bookmarkForm.
|
|
700
|
-
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => bookmarkForm.
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
856
|
+
createVNode(_component_el_checkbox, {
|
|
857
|
+
modelValue: bookmarkForm.saveLayerState,
|
|
858
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => bookmarkForm.saveLayerState = $event)
|
|
859
|
+
}, {
|
|
860
|
+
default: withCtx(() => [..._cache[21] || (_cache[21] = [
|
|
861
|
+
createTextVNode("保存当前图层状态(可见性、透明度)", -1)
|
|
862
|
+
])]),
|
|
863
|
+
_: 1
|
|
864
|
+
}, 8, ["modelValue"])
|
|
706
865
|
]),
|
|
707
866
|
_: 1
|
|
708
867
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nextTick, defineComponent, computed, ref, reactive, markRaw, watch, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, vShow, createTextVNode, isVNode, render } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { A as componentSizes, B as obtainAllFocusableElements, C as getEventCode, D as EVENT_CODE, F as ElButton, G as ElFocusTrap, H as ElInput, I as ElOverlay, J as ElIcon, K as TypeComponents, L as useGlobalComponentSettings, N as loading_default, O as TypeComponentsMap, P as useId, Q as useDraggable, S as isFunction, U as isString, V as useLockscreen, W as _export_sfc, Y as useSameTarget, Z as isClient, $ as hasOwn, a0 as isObject, a1 as isUndefined, a2 as isElement, a3 as debugWarn } from "./index-7f38e279.mjs";
|
|
3
3
|
const isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
|
|
4
4
|
const FOCUSABLE_CHILDREN = "_trap-focus-children";
|
|
5
5
|
const FOCUS_STACK = [];
|