Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enn-group-map

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enn-group-map - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

7

CHANGELOG.md

@@ -61,1 +61,8 @@ # 记录

- 地图在加载完RichMarker.js后再抛出init函数「只有一次?」
## 0.2.2
- 移除vue2中Vue.prototype._ENN_BMapGL的写法
- 移除element-ui
- 移除loading.js
- 修改global为window

0

index.js

@@ -0,0 +0,0 @@ import EnnMap from './lib/BaseMap.vue';

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import addTypeControl from "./typeControl";

@@ -0,0 +0,0 @@ import('./type.css')

@@ -0,0 +0,0 @@ import('./zoom.css')

1

lib/installMap.js

@@ -6,3 +6,2 @@ import EnnMap from "./BaseMap.vue";

const {ak} = options
Vue.prototype._ENN_BMapGL = () => ({ak})
window.sessionStorage.setItem('_ENN_BMapGL_ak', ak)

@@ -9,0 +8,0 @@ Vue.component('EnnMap', EnnMap)

@@ -0,0 +0,0 @@ // 通过当前数据信息,返回地图图标

@@ -10,22 +10,22 @@ // 初始化百度地图,并将BMapGL挂到window上

export function getMapScript(propsAk) {
if (!global.BMapGL) {
if (!window.BMapGL) {
const ak = propsAk || window.sessionStorage.getItem("_ENN_BMapGL_ak");
global.BMapGL = {};
global.BMapGL._preloader = new Promise((resolve, reject) => {
global._initBaiduMapGL = function() {
resolve(global.BMapGL);
global.document.body.removeChild($script);
global.BMapGL._preloader = null;
global._initBaiduMapGL = null;
// global.document.body.removeChild($scriptlLib);
window.BMapGL = {};
window.BMapGL._preloader = new Promise((resolve, reject) => {
window._initBaiduMapGL = function () {
resolve(window.BMapGL);
window.document.body.removeChild($script);
window.BMapGL._preloader = null;
window._initBaiduMapGL = null;
// window.document.body.removeChild($scriptlLib);
};
const $script = document.createElement("script");
global.document.body.appendChild($script);
window.document.body.appendChild($script);
$script.src = `https://api.map.baidu.com/api?v=1.0&type=webgl&ak=${ak}&callback=_initBaiduMapGL`;
});
return global.BMapGL._preloader;
} else if (!global.BMapGL._preloader) {
return Promise.resolve(global.BMapGL);
return window.BMapGL._preloader;
} else if (!window.BMapGL._preloader) {
return Promise.resolve(window.BMapGL);
} else {
return global.BMapGL._preloader;
return window.BMapGL._preloader;
}

@@ -32,0 +32,0 @@ }

@@ -0,0 +0,0 @@ import getIcon from "./icon";

{
"name": "enn-group-map",
"version": "0.2.1",
"version": "0.2.2",
"description": "UI公共组件 - 地图组件",

@@ -13,3 +13,3 @@ "main": "index.js",

],
"author": "dolamin",
"author": "frontend-001",
"license": "ISC",

@@ -21,11 +21,3 @@ "devDependencies": {

"vue-template-compiler": "^2.6.11"
},
"dependencies": {
"element-ui": "^2.15.6",
"enn-elementui": "^0.2.3"
},
"peerDependencies": {
"element-ui": "^2.15.6",
"enn-elementui": "^0.2.3"
}
}

@@ -0,0 +0,0 @@ # enn-map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc