提交 81488be5 编写于 作者: L liuxiaohang

update: resolve cookie and ssr render problem

上级 51829fcb
...@@ -189,8 +189,8 @@ export default { ...@@ -189,8 +189,8 @@ export default {
forbidScroll(this.showMobilePanel) forbidScroll(this.showMobilePanel)
}, },
switchVersion () { switchVersion () {
document.cookie = '__new_version=;expires=-1' document.cookie = encodeURIComponent('__new_version') + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"
location.replace(location.origin) location.replace(location.origin + '?v=' + Date.now())
} }
}, },
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
computed: { computed: {
currentConfig() { currentConfig() {
return this.siderbarConfig[this.customNavBarKeys[this.navConfig.userNavIndex]]; return this.siderbarConfig[this.customNavBarKeys[this.navConfig.userNavIndex]] || {};
}, },
currentQQGroup() { currentQQGroup() {
return [...(this.currentConfig.qq_group || [])].reverse(); return [...(this.currentConfig.qq_group || [])].reverse();
......
...@@ -15,18 +15,20 @@ ...@@ -15,18 +15,20 @@
@click="toggleSidebar(false)" @click="toggleSidebar(false)"
/> />
<Sidebar <ClientOnly>
:items="sidebarItems" <Sidebar
@toggle-sidebar="toggleSidebar" :items="sidebarItems"
> @toggle-sidebar="toggleSidebar"
<template #top> >
<slot name="sidebar-top" /> <template #top>
</template> <slot name="sidebar-top" />
<template #bottom> </template>
<slot name="sidebar-bottom" /> <template #bottom>
<SiderBarBottom /> <slot name="sidebar-bottom" />
</template> <SiderBarBottom />
</Sidebar> </template>
</Sidebar>
</ClientOnly>
<Home v-if="$page.frontmatter.home" /> <Home v-if="$page.frontmatter.home" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册