Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 03:49:19 +08:00

验证ie,并引导使用其它浏览器

This commit is contained in:
淳冉 2024-11-04 11:30:26 +08:00 committed by GitHub
parent 0bcb7886d5
commit 49db13b0e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,16 @@
<div id="app">
<div id="app-loading"></div>
</div>
<script type="text/javascript">
// 检测是否为 IE 浏览器
function isIE() {
return /MSIE|Trident/.test(window.navigator.userAgent);
}
if (isIE()) {
document.body.innerHTML = '<h1>抱歉,您的浏览器不支持此应用。请使用现代浏览器,例如 <a href="https://www.google.com/chrome/">Chrome</a><a href="https://www.mozilla.org/firefox/">Firefox</a><a href="https://www.microsoft.com/edge">Edge</a></h1>';
}
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>