mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
recommend user to use Google Chrome
This commit is contained in:
parent
14aee28289
commit
3cff6f7189
@ -8,6 +8,8 @@
|
|||||||
import {ElConfigProvider} from 'element-plus';
|
import {ElConfigProvider} from 'element-plus';
|
||||||
import {onMounted} from "vue";
|
import {onMounted} from "vue";
|
||||||
import {getSystemInfo} from "@/store/cache";
|
import {getSystemInfo} from "@/store/cache";
|
||||||
|
import {isChrome} from "@/utils/libs";
|
||||||
|
import {showMessageInfo} from "@/utils/dialog";
|
||||||
|
|
||||||
const debounce = (fn, delay) => {
|
const debounce = (fn, delay) => {
|
||||||
let timer
|
let timer
|
||||||
@ -36,6 +38,9 @@ onMounted(() => {
|
|||||||
link.href = res.data.logo
|
link.href = res.data.logo
|
||||||
document.head.appendChild(link)
|
document.head.appendChild(link)
|
||||||
})
|
})
|
||||||
|
if (!isChrome()) {
|
||||||
|
showMessageInfo("检测到您使用的浏览器不是 Chrome,可能会导致部分功能无法正常使用,建议使用 Chrome 浏览器。")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -232,4 +232,9 @@ export const replaceImg =(img) => {
|
|||||||
}
|
}
|
||||||
return img
|
return img
|
||||||
}
|
}
|
||||||
|
export function isChrome() {
|
||||||
|
const userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
return /chrome/.test(userAgent) && !/edg/.test(userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user