修改BUG:sidebar高度变化后,滚动条高度变化导致最末端菜单项不可见

This commit is contained in:
Argo-MacBookPro 2018-09-16 19:40:32 +08:00
parent c76747b9ad
commit 69ce17ab32
1 changed files with 8 additions and 1 deletions

View File

@ -151,11 +151,12 @@ $(function () {
scrollTop: 0
}, 200);
});
$('[data-toggle="tooltip"]').tooltip();
// breadcrumb
var arch = $sideMenu.find('a.active').last();
if (arch.text() !== "") $breadNav.removeClass('d-none').text(arch.text());
// sidebar scroll animate
var top = (arch.offset() || { top: 0 }).top;
if (top > 0) {
var middle = $('header').outerHeight() + $sidebar.outerHeight() / 2;
@ -169,6 +170,9 @@ $(function () {
$sidebar.scrollTo("-=" + Math.abs(diff), 500);
else
$sidebar.scrollTo("+=" + Math.abs(diff), 500);
// resize nicscroll
$sidebar.getNiceScroll().resize();
});
$('.sidebar-toggle-box').on('click', function () {
@ -185,6 +189,9 @@ $(function () {
$('[data-toggle="dropdown"].dropdown-select').dropdown('select');
// tooltip
$('[data-toggle="tooltip"]').tooltip();
// load widget data
$('.header .nav').reloadWidget().socketHandler({
onmessage: function (e) {