vue+elementui封装下载base64文件流,下载模板。
vue+elementui封装下载base64文件流,下载模板。
·
前景:后台返回的是base64文件流。
html
<el-button class="btn-down" type="primary" @click="downloadScoreExample">下载模板</el-button>
封装方法:
js:
dataurlLoad(dataurl,name){
var bstr=atob(dataurl),
n=bstr.length,
u8rr=new Uint8Array(n);
while(n--){
u8rr[n]=bstr.charCodeAt(n);
}
let blob = new Blob([u8rr]);
let url=URL.createObjectURL(blob);
let a=document.createElement('a')
a.href=url;
a.download=name;
a.click();
URL.revokeObjectURL(a.href);
},
文件流:
例子:不带前面的 data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,
var data = "UEsDBBQABgAIAAAAIQBBN4LPbgEAAAQFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAC9EwAAeGwvc3R5bGVzLnhtbFBLAQItABQABgAIAAAAIQDK1BGrigIAADwGAAAYAAAAAAAAAAAAAAAAAO0WAAB4bC93b3Jrc2hlZXRzL3NoZWV0MS54bWxQSwECLQAUAAYACAAAACEAj6MmJT8BAABRAgAAEQAAAAAAAAAAAAAAAACtGQAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAf/RX7kUAAADcAAAAJwAAAAAAAAAAAAAAAAAjHAAAeGwvcHJpbnRlclNldHRpbmdzL3ByaW50ZXJTZXR0aW5nczEuYmluUEsBAi0AFAAGAAgAAAAhAIVV69iaAQAAEAMAABAAAAAAAAAAAAAAAAAArRwAAGRvY1Byb3BzL2FwcC54bWxQSwUGAAAAAAwADAAmAwAAfR8AAAAA"
调用方法:
//res.data.file base64文件流
//res.data.name:是后台返回的文件名
this.dataurlLoad(res.data.file,res.data.name);
扩展方法:
//带data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,
//方法二
function downloadBaes64File() {
let url = "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,UEsDBBQABgAIAAAAIQBBN4LPbgEAAAQFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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N0cmluZ3MueG1sUEsBAi0AFAAGAAgAAAAhADttMkvBAAAAQgEAACMAAAAAAAAAAAAAAAAA9QsAAHhsL3dvcmtzaGVldHMvX3JlbHMvc2hlZXQxLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAFxcRVyVBgAA5BsAABMAAAAAAAAAAAAAAAAA9wwAAHhsL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAYACAAAACEAKlCbhAUDAACzBwAADQAAAAAAAAAAAAAAAAC9EwAAeGwvc3R5bGVzLnhtbFBLAQItABQABgAIAAAAIQDK1BGrigIAADwGAAAYAAAAAAAAAAAAAAAAAO0WAAB4bC93b3Jrc2hlZXRzL3NoZWV0MS54bWxQSwECLQAUAAYACAAAACEAj6MmJT8BAABRAgAAEQAAAAAAAAAAAAAAAACtGQAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAf/RX7kUAAADcAAAAJwAAAAAAAAAAAAAAAAAjHAAAeGwvcHJpbnRlclNldHRpbmdzL3ByaW50ZXJTZXR0aW5nczEuYmluUEsBAi0AFAAGAAgAAAAhAIVV69iaAQAAEAMAABAAAAAAAAAAAAAAAAAArRwAAGRvY1Byb3BzL2FwcC54bWxQSwUGAAAAAAwADAAmAwAAfR8AAAAA"
let a = document.createElement("a"); // 生成一个a元素
let event = new MouseEvent("click"); // 创建一个单击事件
a.download = new Date().toLocaleString(); // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件
简单记录一下!!! 方便查阅。
更多推荐
已为社区贡献10条内容
所有评论(0)