vuepress插件_vuepress的阅读进度条插件

vuepress插件

Vuepress插件阅读进度 (vuepress-plugin-reading-progress)

a reading progress bar plugin for vuepress.

vuepress的阅读进度条插件。

This plugin is for Vuepress 1.x which is currently in alpha

该插件用于Vuepress 1.x,目前处于Alpha状态

add reading progress bar for vuepress.

添加vuepress的阅读进度条。

vuepress-plugin-reading

安装 (Installation)

yarn add vuepress-plugin-reading-progress
// or
npm i vuepress-plugin-reading-progress

用法 (Usage)

module.exports = {
  plugins: [
    'reading-progress'
  ]
}

Vuepress documentation

Vuepress文档

选件 (Options)

阅读目录 (readingDir)

  • Type: null, string, array, Object

    类型: nullstringarrayObject

  • Default: null

    默认值: null

Specify folders that display reading progress bar

指定显示阅读进度条的文件夹

example

{
  readingDir: 'posts'
  // or
  readingDir: ['posts1', 'posts2', 'posts3']
  // or { dir: fixed }
  readingDir: {
    posts1: 'top',
    posts2: 'bottom',
    posts3: 'left'
  }
}

固定 (fixed)

  • Type: string

    类型: string

  • Default: top

    默认值: top

support top, bottom, left, right

支持topbottomleftright

set position for reading progress bar

设置读取进度条的位置

前事 (Front matter)

Change the reading progress bar display of the current page by use readingShow

通过使用readingShow更改当前页面的阅读进度条显示

---
readingShow: false
---
// or
---
readingShow: true
---

样式 (Style)

If you wish to apply simple color overrides to the styling

如果您希望对样式应用简单的颜色替代

+- .vuepress
  +- styles
    +- palette.styl
$readingBgColor = transparent
$readingZIndex = 1000
$readingSize = 3px
$readingProgressColor = $accentColor
$readingProgressImage = none
(example)
$readingProgressImage = linear-gradient(-150deg, #E50743 0%, #F9870F 15%, #E8ED30 30%, #3FA62E 45%, #3BB4D7 60%, #2F4D9E 75%, #71378A 80%)

翻译自: https://vuejsexamples.com/a-reading-progress-bar-plugin-for-vuepress/

vuepress插件

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值