From aa81008bd10662cb94b224ecc2f619ff9ad67077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E4=BF=8A=E4=B8=9C?= <1172482914@qq.com> Date: Mon, 6 Jul 2020 11:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/public/index.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ruoyi-ui/public/index.html b/ruoyi-ui/public/index.html index 525e2acd6..ba68f2ffb 100644 --- a/ruoyi-ui/public/index.html +++ b/ruoyi-ui/public/index.html @@ -7,6 +7,39 @@ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title><%= webpackConfig.name %></title> + <script> + function compatible() { + // flex支持属性 + return !!support_css3('flex') + } + var support_css3 = (function () { + var div = document.createElement('div'), + vendors = 'Ms O Moz Webkit'.split(' '), + len = vendors.length; + + return function (prop) { + if (prop in div.style) return true; + + prop = prop.replace(/^[a-z]/, function (val) { + return val.toUpperCase(); + }); + + while (len--) { + if ((vendors[len] + prop in div.style) || ('-' + vendors[len] + '-' + prop).toLowerCase() in div.style) { + return true; + } + } + return false; + }; + })(); + if (!compatible()) { + var msg = '当前浏览器版本过低,请使用qq浏览器或360浏览器、谷歌浏览器。若已使用qq浏览器或者360浏览器,请使用极速模式。' + alert(msg) + window.onload = function () { + document.write(msg) + } + } + </script> <style> html, body,