feat: add img zoom
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h, watch } from 'vue'
|
||||
import { watch } from 'vue'
|
||||
import { createMediumZoomProvider } from './useMediumZoom'
|
||||
// import Theme from 'vitepress/theme'
|
||||
import DefaultTheme from 'vitepress/theme-without-fonts'
|
||||
import Layout from './Layout.vue'
|
||||
@@ -14,6 +15,7 @@ let homePageStyle = undefined
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
Layout: Layout,
|
||||
|
||||
enhanceApp(ctx) {
|
||||
DefaultTheme.enhanceApp(ctx)
|
||||
ctx.app.component('Download', Download)
|
||||
@@ -21,12 +23,12 @@ export default {
|
||||
ctx.app.component('Parallax', Parallax)
|
||||
if (typeof window === 'undefined')
|
||||
return
|
||||
|
||||
watch(
|
||||
() => ctx.router.route.data.relativePath,
|
||||
() => updateHomePageStyle(location.pathname === '/' || location.pathname === '/contributors'),
|
||||
{ immediate: true },
|
||||
)
|
||||
createMediumZoomProvider(ctx.app, ctx.router)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user