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

vue-reader

v1.3.7

Published

<div align="center"> <img width=250 src="https://raw.githubusercontent.com/jinhuan138/vue-reader/master/public/logo.png" /> <h1>VueReader</h1> </div>

Readme

English

介绍

轻松地将 EPUB 阅读器嵌入你的 Web 应用。

安装

从 v1.3.x 开始,vue-reader 不再支持 Vue 2。如需在 Vue 2 中使用,请安装 v1.2.x。

npm i vue-reader
pnpm add vue-reader

基本用法

<template>
  <div style="height: 100vh">
    <vue-reader url="/files/啼笑因缘.epub" />
  </div>
</template>
<script setup>
import { VueReader } from 'vue-reader'
</script>
<template>
  <div style="height: 100vh">
    <vue-reader url="/files/啼笑因缘.epub" />
  </div>
</template>
<script>
import { VueReader } from 'vue-reader'
export default {
  components: { VueReader },
}
</script>

VueReader API

VueReader 属性

| 名称 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | url | 图书 URL 或 ArrayBuffer | string/ArrayBuffer | — | | title | 图书标题 | string | — | | showToc | 是否显示目录 | boolean | true | | EpubView 属性 | 可使用全部 EpubView 属性。 | - | |

VueReader 插槽

| 名称 | 说明 | | --- | --- | | title | 图书标题 | | EpubView 插槽 | 可使用全部 EpubView 插槽。 |

VueReader 暴露的方法

| 名称 | 说明 | | --- | --- | | EpubView 暴露的方法 | 可使用 EpubView 暴露的全部方法。 |

EpubView API

EpubView 属性

| 名称 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | url | 图书路径或 ArrayBuffer | string/ArrayBuffer | — | | location | 设置或更新 EPUB 阅读位置 | string/number | — | | tocChanged | 阅读器解析图书后,通过此回调接收章节数组 | function(toc) | — | | epubInitOptions | 传递给 EPUB 初始化函数的自定义属性,参见 epub.js | object | — | | epubOptions | 传递给 EPUB 渲染器的自定义属性,参见 epub.js 的 book.renderTo 函数 | object | — | | getRendition | epub.js 渲染 EPUB 文件后,通过此回调获取 rendition 对象 | function(rendition) | — |

EpubView 事件

| 名称 | 说明 | 类型 | | --- | --- | --- | | update:location | 接收当前阅读位置。页面变化以及首次渲染时都会触发。 | function(location) | | select | 选中文本时触发 | function(cfirange,contents) | | keyPress | 按下按键时触发 | function(keyboardEvent) |

EpubView 插槽

| 名称 | 说明 | | --- | --- | | loadingView | EPUB 加载时显示的内容 | | errorView | EPUB 加载失败时显示的内容 |

EpubView 暴露的方法

| 名称 | 说明 | 类型 | | --- | --- | --- | | nextPage | 显示下一页 | function | | prevPage | 显示上一页 | function | | setLocation | 跳转到指定位置 | function(href) |

相关项目

Star 历史

Star History Chart