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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fktest/vue-file-preview

v1.0.1

Published

这是一个文件预览组件

Downloads

6

Readme

vue-file-preview

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

node:14.17.5

packages:存放你所需要开发的所有组件的目录 lib:存放组件源码 packages/index.js:将组件注册为全局组件 examples:最初项目的src,我们可以一边开发一边调试

仓库:https://packages.aliyun.com/npm/npm-registry/guide

使用: main.js中引入组件 import filePreview from 'vue-file-preview'; import 'vue-file-preview/lib/file-preview.css'; Vue.use(filePreview, 'name') // name为组件名称

    <file-preview extName="html" 
    :requestData="{
        schoolNum:15182,
        fileId:45317,
        randomDataId:'',
        token:'IrM6PSXZ/CKFgu2MWL3DqQ==',
        resName:'html',
        businessType:0,
        utId:''
        }"></file-preview>
extName: {
    type: String,
    default: 'pptx'
},
// 基础请求地址
baseUrl: {
    type: String,
    default: ''
},
// 请求接口地址
apiUrl: {
    type: String,
    default: ''
},
// 是否远程请求文件,默认是true
remote: {
    type: Boolean,
    default: true
},
// 文件请求参数
requestData: {
    type: Object,
    default () {
    return {
        schoolNum: '15182',
        fileId: '45320',
        randomDataId: '',
        token: 'IrM6PSXZ/CKFgu2MWL3DqQ==',
        resName: 'pptx',
        businessType: '0',
        utId: ''
    }
    }
},
// 预览数据
previewData: {
    type: Object,
    default () {
    return {}
    }
}

// 预览3d地址
threeUrl: {
    type: String,
    default: ''
},

// 请求头信息
headers: {
    type: Object,
    default () {
    return {}
    }
}
    • 0: 文本文件(txt, TXT, log, LOG)
    • 1: Word文档(doc, DOC, docx, DOCX)
    • 2: Excel文件(xls, XLS, xlsx, XLSX)
    • 3: PowerPoint文件(ppt, PPT, pptx, PPTX)
    • 4: PDF文件(pdf, PDF)
    • 5: 图片文件(png, PNG, jpg, JPG, jpeg, JPEG, gif, GIF, bmp, BMP)
    • 6: Photoshop文件(psd, PSD)
    • 7: 编程或配置文件(java, JAVA, c, C, cpp, CPP, cxx, CXX, sql, SQL, css, CSS, php, PHP, js, JS, jsp, JSP, py, PY, xml, XML, properties, PROPERTIES),但不包括crtx文件
    • 8: 压缩文件(zip, ZIP)
    • 9: 视频文件(mp4, MP4, mov, MOV, avi, AVI, flv, FLV, rmvb, RMVB, wmv, WMV, mpeg, MPEG, mkv, MKV, f4v, F4V, m4v, M4V, rm, RM, 3gp, 3GP, dat, DAT, ts, TS, mts, MTS, vob, VOB)
    • 10: 其他未知文件类型
    • 11: ai
    • 12: 音频文件(aac, amr, ape, flac, m4r, mmf, mp2, mp3, MP3, ogg, wav, wma, wv)
    • 13: 3D模型文件(obj, 3ds, stl, ply, gltf, off, 3dm, fbx, dae, wrl, 3mf, amf, ifc, brep, step, iges, fcstd, bim, igs, stp, glb)
    • 14: XMind思维导图文件(xmind)