uni-leaflet 1.0.2 → 1.0.4

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/app-render.js CHANGED
@@ -1,4 +1,6 @@
1
- import L from 'leaflet';
1
+ import * as LModule from 'leaflet';
2
+
3
+ const L = (LModule && LModule.default) ? LModule.default : LModule;
2
4
 
3
5
  // Inject essential Leaflet layout CSS into Webview document
4
6
  function ensureLeafletStyles() {
@@ -29,9 +29,11 @@ export interface H5AdapterOptions {
29
29
  onOverlayClick?: (event: OverlayClickEvent) => void;
30
30
  }
31
31
 
32
- import L from 'leaflet';
32
+ import * as LModule from 'leaflet';
33
33
  import 'leaflet/dist/leaflet.css';
34
34
 
35
+ const L: any = (LModule as any).default || LModule;
36
+
35
37
  export class H5MapAdapter implements IMapEngine {
36
38
  private map: any = null;
37
39
  private tileLayers: any[] = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-leaflet",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Cross-platform Leaflet and Native Canvas 2D Map Component for Uni-App (Vue 3, H5, WeChat Mini-Program, App)",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",
@@ -33,12 +33,7 @@
33
33
  "leaflet": "^1.9.4"
34
34
  },
35
35
  "peerDependencies": {
36
- "vue": "^3.0.0"
37
- },
38
- "peerDependenciesMeta": {
39
- "@dcloudio/uni-app": {
40
- "optional": true
41
- }
36
+ "vue": ">=3.0.0"
42
37
  },
43
38
  "uni_modules": {
44
39
  "scripts": {},