We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41e4590 commit ce7da09Copy full SHA for ce7da09
packages/@vuepress/plugin-medium-zoom/index.js
@@ -1,5 +1,8 @@
1
const { path } = require('@vuepress/shared-utils')
2
3
-module.exports = {
+module.exports = (options, context) => ({
4
+ define: {
5
+ SELECTOR: options.selector || '.content img'
6
+ },
7
clientRootMixin: path.resolve(__dirname, 'mixin.js')
-}
8
+})
packages/@vuepress/plugin-medium-zoom/mixin.js
@@ -1,10 +1,12 @@
+/* global SELECTOR */
+
import './style.css'
import zoom from 'medium-zoom'
export default {
mounted () {
setTimeout(() => {
- zoom('.content img')
9
+ zoom(SELECTOR)
10
}, 1000)
11
}
12
0 commit comments