摘要:
function debounce(fn,delay){ let timer = null; return function (){ clearTimeout(timer); timer = setTimeout(function(){ fn.apply(this); },delay) } } 阅读全文
posted @ 2020-10-14 21:44
cruor
阅读(131)
评论(0)
推荐(0)
摘要:
分享一个我常用的页面物理像素自适应布局方法: window.onload = function (){ let dpr = window.devicePixelRatio; let scale = 1/dpr; let width = document.documentElement.clientW 阅读全文
posted @ 2020-10-14 20:42
cruor
阅读(156)
评论(1)
推荐(1)
摘要:
axios.interceptors.request.use( config => { if(store.state.token){ config.headers.Authorization = `token ${store.state.token}`; } return config; }, er 阅读全文
posted @ 2020-10-14 19:53
cruor
阅读(187)
评论(0)
推荐(0)

浙公网安备 33010602011771号