mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 13:26:08 +10:00
28 lines
414 B
JavaScript
28 lines
414 B
JavaScript
/* global SELECTOR, OPTIONS */
|
|
|
|
import './style.css'
|
|
import zoom from 'medium-zoom'
|
|
|
|
export default {
|
|
data: () => ({ zoom: null }),
|
|
|
|
mounted () {
|
|
this.updateZoom()
|
|
},
|
|
|
|
updated () {
|
|
this.updateZoom()
|
|
},
|
|
|
|
methods: {
|
|
updateZoom () {
|
|
setTimeout(() => {
|
|
if (this.zoom) {
|
|
this.zoom.detach()
|
|
}
|
|
this.zoom = zoom(SELECTOR, OPTIONS)
|
|
}, 1000)
|
|
}
|
|
}
|
|
}
|