# @vuepress/plugin-medium-zoom (opens new window)

medium-zoom (opens new window) 插件

# 安装

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

# 使用

简单使用:

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

自定义选项:

module.exports = { plugins: { '@vuepress/medium-zoom': { selector: 'img.zoom-custom-imgs', // medium-zoom options here // See: https://github.com/francoischalifour/medium-zoom#options options: { margin: 16 } } } } 

# 选项

# selector

  • 类型: string
  • 默认值: .theme-default-content :not(a) > img

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

# options

  • 类型: object
  • 默认值: undefined

medium-zoom (opens new window)选项 (opens new window)