mirror of
https://github.com/501351981/vue-office.git
synced 2025-07-25 07:41:42 +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 {
|
return {
|
||||||
docx: ''
|
docx: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
fetch('你的API文件地址', {
|
fetch('你的API文件地址', {
|
||||||
method: 'post'
|
method: 'post'
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
//读取文件的arrayBuffer
|
//读取文件的arrayBuffer
|
||||||
res.arrayBuffer().then(res=>{
|
res.arrayBuffer().then(res=>{
|
||||||
this.src = res
|
this.docx = res
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
rendered(){
|
rendered(){
|
||||||
console.log("渲染完成")
|
console.log("渲染完成")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user