会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
远看山有色
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2021年11月29日
前端性能小优化-使用push代替concat进行数组合并
摘要: 数组合并,使用push方法比concat方法在速度上更快,在大数据的情况下,效果明显,有数据表明快了近945倍。 arr1.push(...arr2); // 代替 arr1 = arr1.concat(arr2);
阅读全文
posted @ 2021-11-29 17:26 远看山有色
阅读(144)
评论(0)
推荐(0)
2021年11月26日
自定义日历
摘要: <template> <div class="calendar"> <div class="calendar-header">{{ year }} 年 {{ month }} 月</div> <div class="calendar-row-header"> <div class="row-item
阅读全文
posted @ 2021-11-26 14:29 远看山有色
阅读(148)
评论(0)
推荐(0)
图片下载
摘要: 1. 普通url数据下载 示例: https://wework.qpic.cn/wwpic/306595_0iIcXxBHTkKvsxV_1610689000/0 https://allpro.saas.top/1610704815878.jpg 解决方案: // 我们可以将下载地址借助Blob转换
阅读全文
posted @ 2021-11-26 14:18 远看山有色
阅读(678)
评论(0)
推荐(0)
2021年11月25日
二维码和条形码的生成方法
摘要: 1. 通过pure-svg-code插件生成二维码和条形码 <!--npm下载插件--> npm install pure-svg-code --save-dev <img :src="barCode" alt="条形码"> <img :src="qrCode" alt="二维码"> import
阅读全文
posted @ 2021-11-25 16:39 远看山有色
阅读(1396)
评论(0)
推荐(0)
2021年11月23日
防抖和节流
摘要: 防抖:指触发事件后的n秒内函数只执行一次,若在n秒内再次触发则重新计算时间。 // 防抖 debounce // 延后执行 function debounce(func, wait) { let timer; return function() { if (timer) clearTimeout(t
阅读全文
posted @ 2021-11-23 16:53 远看山有色
阅读(34)
评论(0)
推荐(0)
2021年11月11日
今天开通博客啦
摘要: 为了记录生活、记录学习过程而开通博客。
阅读全文
posted @ 2021-11-11 17:37 远看山有色
阅读(24)
评论(0)
推荐(0)
上一页
1
2
公告