摘要: 数组合并,使用push方法比concat方法在速度上更快,在大数据的情况下,效果明显,有数据表明快了近945倍。 arr1.push(...arr2); // 代替 arr1 = arr1.concat(arr2); 阅读全文
posted @ 2021-11-29 17:26 远看山有色 阅读(144) 评论(0) 推荐(0)
摘要: <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)
摘要: 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)
摘要: 防抖:指触发事件后的n秒内函数只执行一次,若在n秒内再次触发则重新计算时间。 // 防抖 debounce // 延后执行 function debounce(func, wait) { let timer; return function() { if (timer) clearTimeout(t 阅读全文
posted @ 2021-11-23 16:53 远看山有色 阅读(34) 评论(0) 推荐(0)
摘要: 为了记录生活、记录学习过程而开通博客。 阅读全文
posted @ 2021-11-11 17:37 远看山有色 阅读(24) 评论(0) 推荐(0)