摘要:
function debounce(fn,delay){ let timer = null; return function (){ clearTimeout(timer); timer = setTimeout(function(){ fn.apply(this); },delay) } } 阅读全文
摘要:
分享一个我常用的页面物理像素自适应布局方法: window.onload = function (){ let dpr = window.devicePixelRatio; let scale = 1/dpr; let width = document.documentElement.clientW 阅读全文
摘要:
axios.interceptors.request.use( config => { if(store.state.token){ config.headers.Authorization = `token ${store.state.token}`; } return config; }, er 阅读全文