diff --git a/docs/.vitepress/vitepress/components/vp-app.vue b/docs/.vitepress/vitepress/components/vp-app.vue index 7459fc1033..ba6e1b3af1 100644 --- a/docs/.vitepress/vitepress/components/vp-app.vue +++ b/docs/.vitepress/vitepress/components/vp-app.vue @@ -28,6 +28,8 @@ useToggleWidgets(isSidebarOpen, () => { } }) +const userPrefer = useStorage(USER_PREFER_GITHUB_PAGE, null) + onMounted(async () => { if (!isClient) return window.addEventListener( @@ -61,10 +63,7 @@ onMounted(async () => { if (lang.value === 'zh-CN') { if (location.host === 'element-plus.gitee.io') return - const userPrefer = useStorage( - USER_PREFER_GITHUB_PAGE, - false - ) + if (userPrefer.value) { // no alert in the next 90 days if (