11 2021 档案
摘要:数组合并,使用push方法比concat方法在速度上更快,在大数据的情况下,效果明显,有数据表明快了近945倍。 arr1.push(...arr2); // 代替 arr1 = arr1.concat(arr2);
阅读全文
摘要:<template> <div class="calendar"> <div class="calendar-header">{{ year }} 年 {{ month }} 月</div> <div class="calendar-row-header"> <div class="row-item
阅读全文
摘要:1. 普通url数据下载 示例: https://wework.qpic.cn/wwpic/306595_0iIcXxBHTkKvsxV_1610689000/0 https://allpro.saas.top/1610704815878.jpg 解决方案: // 我们可以将下载地址借助Blob转换
阅读全文
摘要:1. 通过pure-svg-code插件生成二维码和条形码 <!--npm下载插件--> npm install pure-svg-code --save-dev <img :src="barCode" alt="条形码"> <img :src="qrCode" alt="二维码"> import
阅读全文
摘要:防抖:指触发事件后的n秒内函数只执行一次,若在n秒内再次触发则重新计算时间。 // 防抖 debounce // 延后执行 function debounce(func, wait) { let timer; return function() { if (timer) clearTimeout(t
阅读全文

浙公网安备 33010602011771号