@vuepress/plugin-medium-zoom

medium-zoommedium-zoom - 图1 plugin

Install

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

Usage

Simple:

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

With options:

  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. }

Options

selector

  • Type: string
  • Default: .theme-default-content :not(a) > img

Note that .theme-default-content is the class name of <Content /> component in default theme.

options

  • Type: object
  • Default: undefined

Optionsmedium-zoom - 图2 for medium-zoommedium-zoom - 图3.