Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

MrHanson/vue-file-preview

Repository files navigation

vue-file-preview

npmLicense

Description

A file preview component by Vue , maked up by serval previewer components

Filetype Support

  • img
  • excel

Install

  npm install --save vue '@mrhanson/vue-file-preview'
  # or
  yarn add vue '@mrhanson/vue-file-preview'

Example

CLICK ME

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, 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

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