File tree 3 files changed +41
-6
lines changed
@vuepress/plugin-medium-zoom
3 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const { path } = require('@vuepress/shared-utils')
2
2
3
3
module . exports = ( options , context ) => ( {
4
4
define : {
5
- SELECTOR : options . selector || '.content img' ,
5
+ SELECTOR : options . selector || '.theme-default- content img' ,
6
6
OPTIONS : options . options
7
7
} ,
8
8
clientRootMixin : path . resolve ( __dirname , 'clientRootMixin.js' )
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ module.exports = {
31
31
plugins: {
32
32
' @vuepress/medium-zoom' : {
33
33
selector: ' img.zoom-custom-imgs' ,
34
-
35
- // medium-zoom options here ( https://github.com/francoischalifour/medium-zoom#options)
34
+ // medium-zoom options here
35
+ // See: https://github.com/francoischalifour/medium-zoom#options
36
36
options: {
37
37
margin: 16
38
38
}
@@ -46,8 +46,13 @@ module.exports = {
46
46
### selector
47
47
48
48
- Type: ` string `
49
- - Default: ` .content img `
49
+ - Default: ` .theme-default-content img `
50
+
51
+ Note that ` .theme-default-content ` is the class name of [ ` <Content /> ` ] ( ../../guide/using-vue.md#content ) component in default theme.
50
52
51
53
### options
52
54
53
- Other ` medium-zoom ` options. [ See documentation] ( https://github.com/francoischalifour/medium-zoom#options ) .
55
+ - Type: ` object `
56
+ - Default: ` undefined `
57
+
58
+ [ Options] ( https://github.com/francoischalifour/medium-zoom#options ) for [ medium-zoom] ( https://github.com/francoischalifour/medium-zoom ) .
Original file line number Diff line number Diff line change @@ -16,15 +16,45 @@ yarn add -D @vuepress/plugin-medium-zoom@next
16
16
17
17
## 使用
18
18
19
+ ## Usage
20
+
21
+ ** 简单使用** :
22
+
19
23
``` javascript
20
24
module .exports = {
21
25
plugins: [' @vuepress/medium-zoom' ]
22
26
}
23
27
```
24
28
29
+ ** 自定义选项** :
30
+
31
+ ``` javascript
32
+ module .exports = {
33
+ plugins: {
34
+ ' @vuepress/medium-zoom' : {
35
+ selector: ' img.zoom-custom-imgs' ,
36
+ // medium-zoom options here
37
+ // See: https://github.com/francoischalifour/medium-zoom#options
38
+ options: {
39
+ margin: 16
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
25
46
## 选项
26
47
27
48
### selector
28
49
29
50
- 类型: ` string `
30
- - 默认值: ` .content img `
51
+ - 默认值: ` .theme-default-content img `
52
+
53
+ 值得注意的是, ` .theme-default-content ` 是默认主题添加给 [ ` <Content /> ` ] ( ../../guide/using-vue.md#content ) 组件的 class name。
54
+
55
+ ### options
56
+
57
+ - 类型: ` object `
58
+ - 默认值: ` undefined `
59
+
60
+ [ medium-zoom] ( https://github.com/francoischalifour/medium-zoom ) 的 [ 选项] ( https://github.com/francoischalifour/medium-zoom#options ) 。
You can’t perform that action at this time.
0 commit comments