mirror of
https://github.com/501351981/vue-office.git
synced 2025-07-15 07:32:19 +08:00
doc:获取二进制文件示例
This commit is contained in:
parent
f7b62649ef
commit
2cd4e0aa16
20
README.md
20
README.md
@ -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("渲染完成")
|
||||
|
Loading…
x
Reference in New Issue
Block a user