From 20baac0105da505f42a714aed8043a8d87c17b3d Mon Sep 17 00:00:00 2001 From: rockleona Date: Mon, 5 Feb 2024 16:56:27 +0800 Subject: [PATCH 1/4] fix: leafleat module import error in ssr mode --- components/venue/VenueMap.vue | 42 +- nuxt.config.js | 4 +- package-lock.json | 29355 +++++++++++++++++++++++++++++++- package.json | 1 + plugins/leaflet.js | 14 +- 5 files changed, 29337 insertions(+), 79 deletions(-) diff --git a/components/venue/VenueMap.vue b/components/venue/VenueMap.vue index 21ae11623c..3ec84c7b84 100644 --- a/components/venue/VenueMap.vue +++ b/components/venue/VenueMap.vue @@ -15,7 +15,6 @@ :attribution="tileProvider.attribution" layer-type="base" /> - From b93c2c356c9380f5a1d709fc86c3271f4398216f Mon Sep 17 00:00:00 2001 From: rockleona Date: Wed, 7 Feb 2024 15:21:50 +0800 Subject: [PATCH 4/4] fix: remove leaflet unused code --- nuxt.config.js | 1 - plugins/leaflet.js | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 plugins/leaflet.js diff --git a/nuxt.config.js b/nuxt.config.js index f80953ffa9..087d30019d 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -125,7 +125,6 @@ export default { { src: '~/plugins/strings.js' }, { src: '~/plugins/vue-dompurify.js' }, { src: '~/plugins/vue-awesome-swiper.js' }, - // { src: '~/plugins/leaflet.js', ssr: false }, ], // Auto import components (https://go.nuxtjs.dev/config-components) diff --git a/plugins/leaflet.js b/plugins/leaflet.js deleted file mode 100644 index e1949ae8cd..0000000000 --- a/plugins/leaflet.js +++ /dev/null @@ -1,19 +0,0 @@ -import Vue from 'vue' -import { - LMap, - LControl, - LTileLayer, - LMarker, - LControlZoom, - LControlLayers, - LTooltip, -} from 'vue2-leaflet' -import 'leaflet/dist/leaflet.css' - -Vue.component('l-map', LMap) -Vue.component('l-tile-layer', LTileLayer) -Vue.component('l-marker', LMarker) -Vue.component('l-control', LControl) -Vue.component('l-control-zoom', LControlZoom) -Vue.component('l-conrtol-layers', LControlLayers) -Vue.component('l-tooltip', LTooltip)