自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 js获取URL后面参数

const urlSearchParams = new URLSearchParams(window.location.search);const params = Object.fromEntries(urlSearchParams.entries());console.log(params) // {id: '2', isShare: 'true'}console.log(params.id) // 2

2021-12-10 10:41:28 637

原创 高德地图海量点报错Cannot read property ‘size‘ of undefined“

框起来的地方加上null或者海量点数组就不会报错了

2020-10-14 15:18:57 2761 2

原创 js函数实现深克隆

var obj = {a:123, b:[1,2,3,{a:1, b:2, c:[1,2,3,{q:5, w:6}]}], c:{a:1, b:2}} function clone(val) { if (Array.isArray(val)) { // 判断是不是数组 var _arr = []; val.forEach(item => { _arr.pu.

2020-09-25 16:43:27 402

原创 js 网络图片转base64的方式(可用于html2canvas截不了网络图片)

html2canvas截不了网络图片的时候可将网络图片转成base64赋值给img在截图/** 第一种 */function getBase64(imgUrl) { window.URL = window.URL || window.webkitURL; var xhr = new XMLHttpRequest(); xhr.open("get", imgUrl, true); // 至关重要 xhr.responseType = "blob"; xhr.onload = f

2020-09-22 17:04:57 563

原创 openlayers 地图点(图层)多了后,地图绑定事件执行很卡

// 添加点 val点的数据 点的事件类型envType:pointermove移入singleclick点击var addPoint = function(val, envType , src ,track) { const that = this; var overlay = ''; var key = null; var Point = new ol.geom.Point(bd09togcj02([val.lng, val.lat])); Point.a.

2020-08-21 14:51:35 2396

原创 element 树组件回显高亮,不是复选框勾选

this.$nextTick(function(){ this.$refs.organizationTree.setCurrentKey(this.defaultCheck[this.defaultCheck.length-1]); })/** 此方法写在DOM挂载完成之后mounted *//** 如果还是不生效,使用以下方式 */mounted() { /** 回显选中的树节点 */ setTimeout(()=>{ ...

2020-07-31 10:12:17 350 1

原创 vue路由跳转 解决Uncaught SyntaxError: Unexpected token 「

/** 捕获到错误重新加载路由 */router.onError((error) => { const pattern = /Loading chunk (\d)+ failed/g; const isChunkLoadFailed = error.message.match(pattern); const targetPath = router.history.pending.fullPath; if (isChunkLoadFailed) { r.

2020-07-09 15:08:41 1780

原创 css光晕效果

width:29px;height:29px;background:linear-gradient(90deg,rgba(220,137,255,1) 0%,rgba(162,152,255,1) 52%,rgba(83,160,253,1) 100%);opacity:0.2969;

2019-12-25 20:30:57 5386

原创 关于post请求参数的类型

1.post不设置header是默认是json2.post设置header为application/x-www-form-urlencoded,参数类型是FormData,是字符串的a=1&b=2这种形式3.post通过qs转了过后也是FormData,但是是键值对的方式...

2019-10-23 17:35:09 704

原创 需要登录两次才可以操作其他,需要带cookie

axios默认发送请求是不携带cookie的,需要在main.js加上下面这句axios.defaults.withCredentials = true;

2019-10-23 17:22:39 294

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除