vuepress图片查看插件

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

版权声明:

1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。
2、网站不提供资料下载,如需下载请到原作者页面进行下载。