UUID生成器,rc-upload,moment.js,day.js,milliseconds.js,filesize,js-base64,delayjs
downloadAnnex() { const aTag = document.createElement('a') aTag.href = 'http://..........?annexId=' + this.id //文件id aTag.click() },
<script> const promise=new Promise((resolve, reject) =>{ console.log(1) resolve(); console.log(2) } ) promise.then(()=>{ console.log(3) }) console.log(4) console.log(5) </script>
let telInput=document.querySelector("input") telInput.addEventListener('input',noDou(demo,1000)) //防抖封装 function noDou(fn,wait){ let timeOut=null; return args=>{ if(timeOut) clearTimeout(timeOut) timeOut=setTimeout(fn,wait) } }
这是今天发现的一个问题。 如果导入多个js文件用
const fs=require("fs") let p=new Promise((resolve, reject)=>{ fs.readFile('./resource/1.html',(err,data)=>{ if(err) reject(err); resolve(data) }) })
有时候我们需要DIV水平和垂直都居中,怎么办?
接口地址:注意一定要加上:responseType: 'blob' export const exportData=(data:any)=>{ return request.post({ url:'/Order/ExportByExt', data, responseType: 'blob', }) }