Skip to content

Commit ce7da09

Browse files
committed
feat($medium-zoom): support selector option.
1 parent 41e4590 commit ce7da09

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
const { path } = require('@vuepress/shared-utils')
22

3-
module.exports = {
3+
module.exports = (options, context) => ({
4+
define: {
5+
SELECTOR: options.selector || '.content img'
6+
},
47
clientRootMixin: path.resolve(__dirname, 'mixin.js')
5-
}
8+
})
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
/* global SELECTOR */
2+
13
import './style.css'
24
import zoom from 'medium-zoom'
35

46
export default {
57
mounted () {
68
setTimeout(() => {
7-
zoom('.content img')
9+
zoom(SELECTOR)
810
}, 1000)
911
}
1012
}

0 commit comments

Comments
 (0)