feat: add badge

This commit is contained in:
camera-2018
2023-04-20 12:57:36 +08:00
parent bfdc3f1e49
commit 8b247e3653
2 changed files with 4 additions and 3 deletions

View File

@@ -14,12 +14,13 @@ export default {
return h(DefaultTheme.Layout, null, {
})
},
enhanceApp({ app, router, siteData }) {
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx)
if (typeof window === 'undefined')
return
watch(
() => router.route.data.relativePath,
() => ctx.router.route.data.relativePath,
() => updateHomePageStyle(location.pathname === '/' || location.pathname === '/contributors.html'),
{ immediate: true },
)