refactor: 视频手机模式下侧边栏收起状态
This commit is contained in:
parent
493375288e
commit
7c4df7eb19
|
@ -17,7 +17,7 @@ namespace Bootstrap.Admin.Models
|
|||
Theme = DictHelper.RetrieveActiveTheme();
|
||||
IsDemo = DictHelper.RetrieveSystemModel();
|
||||
ShowCardTitle = DictHelper.RetrieveCardTitleStatus() ? "" : "no-card-header";
|
||||
ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "sidebar-open";
|
||||
ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "collapsed";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@model NavigatorBarModel
|
||||
<aside>
|
||||
<aside class="@Model.ShowSideBar">
|
||||
<div class="bg"></div>
|
||||
<div class="nav-brand justify-content-center">
|
||||
<a href="~/Admin/Index">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
@model ModelBase
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -14,7 +13,7 @@
|
|||
<link href="../css/IE8.css" rel="stylesheet" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="@Model.ShowSideBar">
|
||||
<body>
|
||||
<!--[if lt IE 10 ]>
|
||||
<div id="ieAlert" class="alert alert-danger alert-dismissible">
|
||||
<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>
|
||||
|
|
|
@ -200,6 +200,16 @@ $(function () {
|
|||
}
|
||||
});
|
||||
|
||||
// 大于 769 时考虑网站设置 收缩侧边栏
|
||||
if($(window).width() > 769) {
|
||||
var $ele = $('aside');
|
||||
var collapsed = $ele.hasClass('collapsed');
|
||||
if(collapsed) {
|
||||
$('body').addClass('sidebar-open');
|
||||
$ele.removeClass('collapsed');
|
||||
}
|
||||
}
|
||||
|
||||
$('.sidebar-toggle-box').on('click', function () {
|
||||
$('body').toggleClass('sidebar-open');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue