重构代码:增加IE10兼容性,移除const/let关键字,增加-ms-overflow-style修饰

This commit is contained in:
Argo-MacBookPro 2018-10-06 12:46:48 +08:00
parent abbfb74953
commit a70f8f7d7f
8 changed files with 29 additions and 15 deletions

View File

@ -13,7 +13,7 @@
<body> <body>
<!--[if lt IE 10 ]> <!--[if lt IE 10 ]>
<div id="ieAlert" class="alert alert-danger alert-dismissible"> <div id="ieAlert" class="alert alert-danger alert-dismissible">
<div>你的浏览器版本太低不能完美的支持本系统请升级到至少IE10 <a href="../IE/IE10.exe" target="_blank">本地下载</a> <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" target="_blank">微软下载</a>或者使用Chrome浏览器 <a href="../Software/ChromeSetup.exe" target="_blank">本地下载</a></div> <div>当前浏览器版本太低不支持本系统请升级到至少IE10 <a href="../browser/IE10.exe" target="_blank">本地下载</a> <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" target="_blank">微软下载</a>或者使用Chrome浏览器 <a href="../browser/ChromeSetup.exe" target="_blank">本地下载</a></div>
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
</div> </div>
<![endif]--> <![endif]-->

View File

@ -1,11 +1,8 @@
.alert { body > header, body > aside, body > section, body > footer {
position: absolute; display: none;
top: 15px;
left: 15px;
right: 15px;
z-index: 100;
} }
.alert div { .alert {
display: inline-block; margin: 15px auto;
} width: 90%;
}

View File

@ -52,6 +52,10 @@
} }
@media (min-width: 768px) { @media (min-width: 768px) {
html {
-ms-overflow-style: none;
}
.sidebar-open aside { .sidebar-open aside {
transform: translate(0); transform: translate(0);
} }
@ -63,6 +67,7 @@
.main-content { .main-content {
position: fixed; position: fixed;
overflow: auto; overflow: auto;
-ms-overflow-style: auto;
} }
} }

View File

@ -1,5 +1,6 @@
html { html {
font-size: 16px; font-size: 16px;
-ms-overflow-style: auto;
} }
body { body {
@ -97,6 +98,7 @@ a, a:hover, a:focus {
/*Title*/ /*Title*/
.sidebar-toggle-box { .sidebar-toggle-box {
display: block;
font-size: 1.25rem; font-size: 1.25rem;
color: #777; color: #777;
flex: 1 1 auto; flex: 1 1 auto;
@ -243,7 +245,6 @@ a, a:hover, a:focus {
.userinfo .dropdown-item { .userinfo .dropdown-item {
display: flex; display: flex;
flex-wrap: wrap;
width: 270px; width: 270px;
padding: 0; padding: 0;
justify-content: space-around; justify-content: space-around;
@ -313,6 +314,7 @@ a, a:hover, a:focus {
flex: 1 1 auto; flex: 1 1 auto;
text-align: center; text-align: center;
margin-left: 4px; margin-left: 4px;
display: inline-block;
} }
.go-top { .go-top {

View File

@ -207,8 +207,8 @@
bc: function (options) { bc: function (options) {
if (this.attr('lgb_click')) return this; if (this.attr('lgb_click')) return this;
this.attr('lgb_click', true); this.attr('lgb_click', true);
const callback = options.callback; var callback = options.callback;
const that = this; var that = this;
options.callback = function () { that.removeAttr('lgb_click'); if ($.isFunction(callback)) callback.apply(arguments); }; options.callback = function () { that.removeAttr('lgb_click'); if ($.isFunction(callback)) callback.apply(arguments); };
$.bc(options); $.bc(options);
return this; return this;

View File

@ -67,7 +67,7 @@
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, $.format(item.Url, ele.Key), item.Self, ele.ElapsedSeconds); return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, $.format(item.Url, ele.Key), item.Self, ele.ElapsedSeconds);
}).join(''); }).join('');
let cache = $('<div class="card-cache"></div>'); var cache = $('<div class="card-cache"></div>');
cache.append($.format('<h6>{0}</h6>', item.Desc)); cache.append($.format('<h6>{0}</h6>', item.Desc));
cache.append(content); cache.append(content);
$sortable.append(cache); $sortable.append(cache);

View File

@ -0,0 +1,8 @@
body > header, body > aside, body > section, body > footer {
display: none;
}
.alert {
margin: 15px auto;
width: 90%;
}

View File

@ -1,5 +1,6 @@
html { html {
font-size: 16px; font-size: 16px;
-ms-overflow-style: auto;
} }
body { body {
@ -97,6 +98,7 @@ a, a:hover, a:focus {
/*Title*/ /*Title*/
.sidebar-toggle-box { .sidebar-toggle-box {
display: block;
font-size: 1.25rem; font-size: 1.25rem;
color: #eee; color: #eee;
flex: 1 1 auto; flex: 1 1 auto;
@ -249,7 +251,6 @@ a, a:hover, a:focus {
.userinfo .dropdown-item { .userinfo .dropdown-item {
display: flex; display: flex;
flex-wrap: wrap;
width: 270px; width: 270px;
padding: 0; padding: 0;
justify-content: space-around; justify-content: space-around;
@ -319,6 +320,7 @@ a, a:hover, a:focus {
flex: 1 1 auto; flex: 1 1 auto;
text-align: center; text-align: center;
margin-left: 4px; margin-left: 4px;
display: inline-block;
} }
.go-top { .go-top {