Skip to content

Commit e3393e3

Browse files
kidonngulivz
authored andcommitted
fix($plugin-medium-zoom): disable zoom for links (#1719)
1 parent 52f421b commit e3393e3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/@vuepress/plugin-medium-zoom/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { path } = require('@vuepress/shared-utils')
22

33
module.exports = (options, context) => ({
44
define: {
5-
SELECTOR: options.selector || '.theme-default-content img',
5+
SELECTOR: options.selector || '.theme-default-content :not(a) > img',
66
OPTIONS: options.options
77
},
88
clientRootMixin: path.resolve(__dirname, 'clientRootMixin.js')

packages/docs/docs/plugin/official/plugin-medium-zoom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ yarn add -D @vuepress/plugin-medium-zoom@next
2020

2121
```javascript
2222
module.exports = {
23-
plugins: ['@vuepress/medium-zoom']
23+
plugins: ['@vuepress/medium-zoom']
2424
}
2525
```
2626

@@ -46,7 +46,7 @@ module.exports = {
4646
### selector
4747

4848
- Type: `string`
49-
- Default: `.theme-default-content img`
49+
- Default: `.theme-default-content :not(a) > img`
5050

5151
Note that `.theme-default-content` is the class name of [`<Content />`](../../guide/using-vue.md#content) component in default theme.
5252

packages/docs/docs/zh/plugin/official/plugin-medium-zoom.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ yarn add -D @vuepress/plugin-medium-zoom@next
2222

2323
```javascript
2424
module.exports = {
25-
plugins: ['@vuepress/medium-zoom']
25+
plugins: ['@vuepress/medium-zoom']
2626
}
2727
```
2828

@@ -45,10 +45,10 @@ module.exports = {
4545

4646
## 选项
4747

48-
### selector
48+
### selector
4949

5050
- 类型: `string`
51-
- 默认值: `.theme-default-content img`
51+
- 默认值: `.theme-default-content :not(a) > img`
5252

5353
值得注意的是, `.theme-default-content` 是默认主题添加给 [`<Content />`](../../guide/using-vue.md#content) 组件的 class name。
5454

0 commit comments

Comments
 (0)