sunnyxujian / vuepress-plugin-image-viewer

vuepress图片查看插件

Home Page:https://xujian.site/vuepress-plugin-image-viewer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vuepress-plugin-image-viewer

This plugin will make your images viewer in your VuePress site.

这个插件会让你的VuePress网站上的图片有便捷的语言效果。

Get start

安装插件

npm install vuepress-plugin-image-viewer
# or
yarn add vuepress-plugin-image-viewer

配置VuePress插件

docs/.vuepress/config.js

module.exports = {
  // ...
  plugins: [
    [
      'vuepress-plugin-image-viewer',
      {
        selector: '.theme-default-content', // 你想要的插件起作用的页面的class或id
         options: {
          excludeClass: 'no-zoom', // 带有这个className的img标签会被排除
        },
      },
    ],
  ]
  // ...
}

Demo

Live Demo

options

这个插件基于 viewerjs 这个库封装的,按照他们库的API配置即可。

See documentation in viewerjs

Reference

viewerjs vuepress-plugin-zooming

About

vuepress图片查看插件

https://xujian.site/vuepress-plugin-image-viewer/

License:MIT License


Languages

Language:JavaScript 100.0%