mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 03:43:11 +08:00
1d7cbb845a
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
490 B
TypeScript
21 lines
490 B
TypeScript
import DefaultTheme from 'vitepress/theme'
|
|
import mediumZoom from 'medium-zoom'
|
|
import { onMounted, watch, nextTick } from 'vue'
|
|
import { useRoute } from 'vitepress'
|
|
import './custom.css'
|
|
|
|
export default {
|
|
extends: DefaultTheme,
|
|
setup() {
|
|
const route = useRoute()
|
|
const initZoom = () => {
|
|
mediumZoom('.main img', { background: 'var(--vp-c-bg)' })
|
|
}
|
|
onMounted(() => initZoom())
|
|
watch(
|
|
() => route.path,
|
|
() => nextTick(() => initZoom())
|
|
)
|
|
},
|
|
}
|