fix: doc domain check (#6793)

* fix: doc domain check

* Update vp-app.vue

* chore: lint code

Co-authored-by: 云游君 <me@yunyoujun.cn>
This commit is contained in:
0song 2022-03-24 14:00:32 +08:00 committed by GitHub
parent b051efd1b7
commit 2f3c447db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,8 @@ useToggleWidgets(isSidebarOpen, () => {
}
})
const userPrefer = useStorage<boolean | string>(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<boolean | string>(
USER_PREFER_GITHUB_PAGE,
false
)
if (userPrefer.value) {
// no alert in the next 90 days
if (