vue-file-preview
A file preview component by Vue , maked up by serval previewer components.
Filetype Support
Install
npm install --save vue '@mrhanson/vue-file-preview'
# or
yarn add vue '@mrhanson/vue-file-preview'
Props
file-previewer
prop |
type |
default |
optional |
description |
fileType |
string |
|
img/excel |
choose which previewer to use |
imgPvProps |
object |
|
|
props of img-previewer |
excelPvProps |
object |
|
|
props of excel-previewer |
img-previewer
prop |
type |
default |
optional |
description |
coverList |
array |
-- |
|
cover item list, can pass object with url , alt , lazy , zIndex , width , height attribute |
previewSrcList |
array |
-- |
|
src list to preview, same as preview-src-list |
width |
string |
'100px' |
|
global width of coverList item |
height |
string |
'100px' |
|
global height of coverList item |
excel-previewer
prop |
type |
default |
optional |
description |
file |
object |
|
|
excel file stream |
isClientStream |
boolean |
true |
|
whether client file stream |
tableHeight |
stirng/number |
|
|
previewer table height |
GitHub