addEventListener但是不调removeEventListener引发的“惨案“
Bug症状:
在B页面点击a标签下载文件,却在下载成功后调用了A页面的几个http请求。看得我直呼好家伙!
寻找病理:
//点击下载按钮调用此方法下载文件
static downloadFileByUrl(url: string) {
const urlObject: any = window.URL || window;
let saveLink: any = document.createElement("a");
saveLink.href = url;
sav
原创
2021-09-16 00:04:24 ·
447 阅读 ·
0 评论