A file preview component by Vue , maked up by serval previewer components
- img
- excel
npm install --save vue '@mrhanson/vue-file-preview'
# or
yarn add vue '@mrhanson/vue-file-preview'| 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 |
| prop | type | default | optional | description |
|---|---|---|---|---|
| coverList | array | -- | cover item list, can pass object with url, alt, lazy, zIndex, style 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 |
| prop | type | default | optional | description |
|---|---|---|---|---|
| file | object | excel file stream | ||
| isClientStream | boolean | true | whether client file stream | |
| tableHeight | stirng/number | previewer table height |