@vuepress/plugin-medium-zoom

medium-zoom 插件

安装

  1. yarn add -D @vuepress/plugin-medium-zoom@next
  2. # OR npm install -D @vuepress/plugin-medium-zoom@next

使用

Usage

简单使用:

  1. module.exports = {
  2. plugins: ['@vuepress/medium-zoom']
  3. }

自定义选项:

  1. module.exports = {
  2. plugins: {
  3. '@vuepress/medium-zoom': {
  4. selector: 'img.zoom-custom-imgs',
  5. // medium-zoom options here
  6. // See: https://github.com/francoischalifour/medium-zoom#options
  7. options: {
  8. margin: 16
  9. }
  10. }
  11. }
  12. }

选项

selector

  • 类型: string
  • 默认值: .theme-default-content img值得注意的是, .theme-default-content 是默认主题添加给 <Content /> 组件的 class name。

options