From 3156d8ff943c735afa80e27606227c2a5f01cd89 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Wed, 2 Mar 2022 15:17:12 +0800 Subject: [PATCH] update: navbar cookie --- docs/.vuepress/theme/components/Navbar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/theme/components/Navbar.vue b/docs/.vuepress/theme/components/Navbar.vue index ca439cfdc..985bb46f3 100644 --- a/docs/.vuepress/theme/components/Navbar.vue +++ b/docs/.vuepress/theme/components/Navbar.vue @@ -189,8 +189,8 @@ export default { forbidScroll(this.showMobilePanel) }, switchVersion () { - // document.cookie = encodeURIComponent('__new_version') + "=__new_version; path=/" - document.cookie = encodeURIComponent('__new_version') + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/" + document.cookie = encodeURIComponent('__old_version') + "=__old_version; path=/" + // document.cookie = encodeURIComponent('__new_version') + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/" location.replace(location.origin + '?v=' + Date.now()) } }, -- GitLab