vue2下载方法拿到后端返回响应头的fileName

res拿到响应头的文件名
精髓:

filename = decodeURIComponent(res.headers["content-disposition"].split("=")[1])

猜你喜欢

转载自blog.csdn.net/weixin_63515766/article/details/127326130