提交 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,6 +15,7 @@ ...@@ -15,6 +15,7 @@
@click="toggleSidebar(false)" @click="toggleSidebar(false)"
/> />
<ClientOnly>
<Sidebar <Sidebar
:items="sidebarItems" :items="sidebarItems"
@toggle-sidebar="toggleSidebar" @toggle-sidebar="toggleSidebar"
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
<SiderBarBottom /> <SiderBarBottom />
</template> </template>
</Sidebar> </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.
先完成此消息的编辑!
想要评论请 注册