gis-common 1.1.18 → 1.1.19
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/resource.min.js +9 -1
- package/package.json +1 -1
package/dist/resource.min.js
CHANGED
|
@@ -460,7 +460,7 @@ var MeasureMode = {
|
|
|
460
460
|
*
|
|
461
461
|
* @param {*} url
|
|
462
462
|
*/
|
|
463
|
-
|
|
463
|
+
asyncLoadScript: function asyncLoadScript(url) {
|
|
464
464
|
return new Promise(function (resolve, reject) {
|
|
465
465
|
try {
|
|
466
466
|
var oscript = document.createElement('script');
|
|
@@ -476,6 +476,7 @@ var MeasureMode = {
|
|
|
476
476
|
resolve(oscript);
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
+
oscript.type = 'text/javascript';
|
|
479
480
|
oscript.src = url;
|
|
480
481
|
document.body.appendChild(oscript);
|
|
481
482
|
} catch (error) {
|
|
@@ -483,6 +484,13 @@ var MeasureMode = {
|
|
|
483
484
|
}
|
|
484
485
|
});
|
|
485
486
|
},
|
|
487
|
+
loadStyle: function loadStyle() {
|
|
488
|
+
var css = document.createElement('link');
|
|
489
|
+
css.href = url;
|
|
490
|
+
css.rel = 'stylesheet';
|
|
491
|
+
css.type = 'text/css';
|
|
492
|
+
document.head.appendChild(css);
|
|
493
|
+
},
|
|
486
494
|
|
|
487
495
|
/**
|
|
488
496
|
* 提取json中的value组成一个新的字符串
|