doc:获取二进制文件示例

This commit is contained in:
liyulin 2023-08-27 22:09:49 +08:00
parent f7b62649ef
commit 2cd4e0aa16

View File

@ -131,17 +131,17 @@ export default {
return {
docx: ''
}
},
mounted(){
fetch('你的API文件地址', {
method: 'post'
}).then(res=>{
//读取文件的arrayBuffer
res.arrayBuffer().then(res=>{
this.src = res
})
},
mounted(){
fetch('你的API文件地址', {
method: 'post'
}).then(res=>{
//读取文件的arrayBuffer
res.arrayBuffer().then(res=>{
this.docx = res
})
},
})
},
methods:{
rendered(){
console.log("渲染完成")