This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-02-09T06:47:36.496Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* blobURL2blob | |
* @param blobURL | |
* @returns {Promise<any>} | |
*/ | |
export function blobURL2blob(blobURL){ | |
return new Promise((resolve, reject) => { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', blobURL, true); | |
xhr.responseType = 'blob'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param designWidth 设计稿宽度 | |
* @param scale 缩放比例(rem最小值不能小于12,如果小于12会被认为是12) | |
* @param maxWidth 大于此宽度停止计算rem | |
*/ | |
(function (designWidth, scale, maxWidth) { | |
const doc = document; | |
const win = window; | |
var docEl = doc.documentElement, | |
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from "lodash"; | |
//marker对象池 | |
let markerMgr = { | |
_idCounter:0, | |
_pool:[], | |
_outPool:{}, | |
_reset(ins){ | |
var m = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live-server ./ -o --port=635 --host=0.0.0.0 --ignorePattern=.*\\.less" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 转换callbak到promise形式 | |
* ex1:有一个api getGeo(success,fail); | |
* 使用后 | |
* callbackToPromise.call(getGeo,arg1,arg2,"|",arg-2,arg-1).then ... | |
* ex2:callbackToPromise.call({callback:api.getGeo,scope:api},arg1,arg2,"|",arg-2,arg-1).then... | |
* @returns {Promise} | |
*/ | |
var callbackToPromise = function(){ | |
var args = Array.prototype.slice.call(arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isIE = function(ver){ | |
var b = document.createElement('b') | |
b.innerHTML = '<!--[if IE ' + ver + ']><i></i><![endif]-->' | |
return b.getElementsByTagName('i').length === 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location.href.replace(/(.+\/)(html)\/.+/,"$1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="format-detection" content="telephone=no"> | |
<meta name="format-detection" content="date=no"> | |
<meta name="format-detection" content="address=no"> | |
<meta name="format-detection" content="email=no"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 获取当前页面的目录 | |
* "http://aa/b/s/b.html" //"http://aa/b/s/" | |
* "http://aa/b/s/b.html/#a/b/c" //"http://aa/b/s/" | |
* "http://aa/b/s/b.html/?asdf=p&a=s#a/b/c" //"http://aa/b/s/" | |
**/ | |
location.href.replace(/([^#?]+)\/.*?$/,"$1/") |
NewerOlder