npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-files-viewer

v1.0.8

Published

vue-files-viewer

Downloads

27

Readme

vue-files-viewer

说明

一款基于 vue2 的支持压缩包、office、图片、文本格式的文件预览插件,压缩包解压是基于 libarchive.js 库二次开发,在原有的功能基础上增加了文件名中文名称显示,多层嵌套时,会将压缩包内所有文件平铺到一起进行展示,左侧显示文件列表,右侧进行预览

demo.png

支持文件类型

  • 压缩包 (zip、rar 、7z )
  • office (pdf、docx、xlsx)
  • 图片 ( gif、jpg、jpeg、bmp、tiff、tif、png、svg)
  • 文本 (txt、json、js、css、java、py、html、jsx、ts、tsx、xml、md、log、editorconfig、browserslistrc、project、gitignore、cfg、sh、yml)
  • 暂不支持:doc、xls等

安装

npm install vue-files-viewer

使用

// main.js
import VueFilesViewer from 'vue-files-viewer'
Vue.use(VueFilesViewer);

//页面组件中
<vue-files-viewer :file="file" :fileName="fileName" />
    
//注意:使用时需要把 public 中的接口文件( wasm-gen 和 worker.min.js )手动复制到项目你所在项目的 public 文件夹下

参数说明

  • file
    • 类型:ArrayBuffer
    • 说明:符合所支持文件类型要求的文件流
  • fileName
    • 类型:String
  • height
    • 类型:String/Number

其中参考并使用不限于以下主要库

  • element-ui
  • libarchive.js
  • web-worker
  • exceljs
  • handsontable
  • @handsontable/vue
  • marked
  • highlight.js
  • pdfjs-dist
  • v-viewer
  • tiff.js
  • docx
  • docx-preview