New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@js-preview/docx

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-preview/docx - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

package.json
{
"name": "@js-preview/docx",
"type" :"module",
"version": "1.3.0",
"version": "1.3.1",
"description": "",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -16,9 +16,9 @@ # vue-office

#docx文档预览组件
npm install @vue-office/docx vue-demi
npm install @vue-office/docx vue-demi@0.13.11
#excel文档预览组件
npm install @vue-office/excel vue-demi
npm install @vue-office/excel vue-demi@0.13.11
#pdf文档预览组件
npm install @vue-office/pdf vue-demi
npm install @vue-office/pdf vue-demi@0.13.11
```

@@ -107,2 +107,51 @@ 如果是vue2.6版本或以下还需要额外安装 @vue/composition-api

```
**二进制文件预览**
如果后端给的不是CDN地址,而是一些POST接口,该接口返回二进制流,则可以调用接口获取文件的ArrayBuffer数据,传递给src属性。
```vue
<template>
<vue-office-docx
:src="docx"
style="height: 100vh;"
@rendered="rendered"
/>
</template>
<script>
//引入VueOfficeDocx组件
import VueOfficeDocx from '@vue-office/docx'
//引入相关样式
import '@vue-office/docx/lib/index.css'
export default {
components:{
VueOfficeDocx
},
data(){
return {
docx: ''
}
},
mounted(){
fetch('你的API文件地址', {
method: 'post'
}).then(res=>{
//读取文件的arrayBuffer
res.arrayBuffer().then(res=>{
this.docx = res
})
})
},
methods:{
rendered(){
console.log("渲染完成")
}
}
}
</script>
```
### excel文件预览

@@ -187,22 +236,14 @@

**_如果该项目确实帮助到了您_**,为您节省了时间,请您不吝赞助,优化项目真的都是用爱发电^_^,有很多大的优化点或者新功能开发实在没有精力,一边要努力工作以免被裁员,一边要陪伴家人,人已不再年轻,没有收益的事情很难抽出更多时间精力~~,不能打赏的朋友麻烦帮点个免费的赞
**_如果该项目确实帮助到了您_**,为您节省了时间,请您不吝赞助,请作者喝一杯秋天的奶茶,暖一暖冰冷的心吧,哈哈哈,优化项目真的都是用爱发电^_^,不能打赏的朋友麻烦帮点个免费的赞
<img src="https://501351981.github.io/vue-office/examples/dist/static/wx.png" alt="赞助二维码" width="260"/>
打赏的朋友欢迎添加微信,交流前端技术,【仅添加打赏过的用户,定期删除屏蔽朋友圈好友】
<span style="color: red;">打赏的朋友欢迎**添加微信**</span>,交流前端开发中遇到的技术、问题和困惑。
>【<span style="color:red;">**仅添加**打赏过的用户,不定期删除屏蔽朋友圈的好友</span>(为什么打赏了才能微信问问题?那别人为什么要先付出时间去解答你的问题?都是成年人了,人与人之间是价值交换,不是单向付出)】
> [常见问题](https://501351981.github.io/vue-office/examples/docs/guide/faq.html)
<img src="https://501351981.github.io/vue-office/examples/dist/static/wxqrcode.png" alt="个人微信" width="260"/>
打赏记录如下,感谢每一位打赏的朋友
| 时间 | 打赏总金额 |
|---------|--------|
| 2023-08 | 10.24 |
| 2023-07 | 115.08 |
| 2023-06 | 20.01 |
| 2023-05 | 70 |
| 2023-04 | 95 |
| 2023-03 | 66.66 |
| 2023-02 | 30 |
### 恳请各位大佬不吝点赞,开源不易,感谢支持~~

@@ -212,6 +253,3 @@

## 我的其他库
- v-focus-next:一个Vue指令,使用该指令后,在表单中回车之后可以自动聚焦下一个表单元素,大大提升表单填写的流畅性。
[《v-focus-next》](https://github.com/501351981/v-focus-next)
- HowToCode:前端编程之道,探讨如何写出高质量的前端代码,总结前端编程的各种方法论、原则、思维模型等。[《前端编程之道》](https://github.com/501351981/HowToCode)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc