var a = document.createElement('a'); a.download = undefined; a.href = res.data.url; a.click(); 参考链接地址:https://www.jianshu.com/p/8447257b8d35