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:
parent
0bcb7886d5
commit
49db13b0e0
10
index.html
10
index.html
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user