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

update: resolve cookie and ssr render problem

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