mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 21:36:16 +10:00
28 lines
396 B
JavaScript
28 lines
396 B
JavaScript
/* global SELECTOR */
|
|
|
|
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)
|
|
}, 1000)
|
|
}
|
|
}
|
|
}
|