1.1.4 • Published 10 months ago
sz-file v1.1.4
vue-sz-file 文件预览插件
集成pdf, excel, word 预览功能
npm i -S sz-file
使用方法
import SzFile from 'sz-file'
import 'SzFile/lib/sz-file.css'
Vue.use(SzFile)
组件
sz-table 继承 element-ui table 原有属性
<template>
<sz-file :url="url" :type="pdf"></sz-file>
<sz-file :url="url" :type="xlsx"></sz-file>
<sz-file :url="url" :type="docx"></sz-file>
</template>
参数 | 说明 | 类型 |
---|---|---|
url | 流或者文件静态访问地址 | arraybuffer / string |
type | 文件类型 | string |
width | pdf容器宽度 | string |
height | pdf容器高度 | string |
fileStyle | pdf容器样式 | string |