hn-map 1.0.6 → 1.0.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/dist/index.js CHANGED
@@ -3651,17 +3651,17 @@
3651
3651
  _defineProperty(hnMap, "allowConstruction", false);
3652
3652
  var loadResource = function loadResource(path, type) {
3653
3653
  return new Promise(function (resolve, reject) {
3654
- var fullPath = path;
3654
+ console.log(path, type, 222222);
3655
3655
  if (type === 'css') {
3656
3656
  var link = document.createElement('link');
3657
3657
  link.rel = 'stylesheet';
3658
- link.href = fullPath;
3658
+ link.href = path;
3659
3659
  link.onload = resolve;
3660
3660
  link.onerror = reject;
3661
3661
  document.head.appendChild(link);
3662
3662
  } else {
3663
3663
  var script = document.createElement('script');
3664
- script.src = fullPath;
3664
+ script.src = path;
3665
3665
  script.onload = resolve;
3666
3666
  script.onerror = reject;
3667
3667
  document.body.appendChild(script);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "hn-map",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "hn-map集成mars3d、高德、思极",
5
- "main": "dist/index.js",
5
+ "main": "src/index.js",
6
6
  "author": "庞大仙",
7
7
  "license": "MIT",
8
8
  "scripts": {
package/src/index.js CHANGED
@@ -89,18 +89,17 @@ export default class hnMap {
89
89
  const loadResource = (path, type) => {
90
90
  return new Promise((resolve, reject) => {
91
91
 
92
- let fullPath = path;
93
-
92
+ console.log(path,type,222222)
94
93
  if (type === 'css') {
95
94
  const link = document.createElement('link')
96
95
  link.rel = 'stylesheet'
97
- link.href = fullPath
96
+ link.href = path
98
97
  link.onload = resolve;
99
98
  link.onerror = reject;
100
99
  document.head.appendChild(link)
101
100
  } else {
102
101
  const script = document.createElement('script')
103
- script.src = fullPath
102
+ script.src = path
104
103
  script.onload = resolve;
105
104
  script.onerror = reject;
106
105
  document.body.appendChild(script)