更新记录

1.0.5(2024-12-30) 下载此版本

添加说明

1.0.0(2024-12-30) 下载此版本

word、excel、pdf的文件预览


平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
×
钉钉小程序 快手小程序 飞书小程序 京东小程序 鸿蒙元服务
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari

chai-office

第三方依赖

复制代码npm i @js-preview/pdf
npm i @js-preview/excel
npm i @js-preview/pdf

API

参数 说明 类型
url 文件网络访问路经或base64编码 String
fileType 文件的类型:docx、xlsx、pdf String

示例项目

复制代码    <view class="content">
        <chai-office :url="'https://501351981.github.io/vue-office/examples/dist/static/test-files/test.docx'" :fileType="'docx'"></chai-office>
    </view>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

插件不采集任何数据

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议
219***@qq.com

2025-04-01

docx的文件预览提示Error: Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html

975***@qq.com

2025-03-31

钉钉小程序开发者工具common_vendor.defineComponent is not a function

826***@qq.com

2025-03-06

h5可以预览, 但是打包成app就不行了, 报错[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

(found )

344***@qq.com

2025-01-04