From 2f3c447db45e315a2180415fd4c61de050fca7b5 Mon Sep 17 00:00:00 2001 From: 0song <82012629+0song@users.noreply.github.com> Date: Thu, 24 Mar 2022 14:00:32 +0800 Subject: [PATCH] fix: doc domain check (#6793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: doc domain check * Update vp-app.vue * chore: lint code Co-authored-by: 云游君 --- docs/.vitepress/vitepress/components/vp-app.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 (