Browse Source

导航菜单over状态调整

zhuth 7 years ago
parent
commit
96077215d6
1 changed files with 4 additions and 2 deletions
  1. 4 2
      frontend/saas-web/app/view/main/Navigation.js

+ 4 - 2
frontend/saas-web/app/view/main/Navigation.js

@@ -121,9 +121,11 @@ Ext.define('saas.view.main.Navigation', {
                         view.el.dom.addEventListener('mouseleave', function (e) {
                             var ex = e.clientX,
                                 ey = e.clientY,
-                                box = menuView.getBoundingClientRect();
+                                box = menuView.getBoundingClientRect(),
+                                navItem = menu.navItem,
+                                navBox = navItem.getBoundingClientRect();
 
-                            if (ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && ey >= (box.top + 64))) {
+                            if (ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && (ey <= navBox.top || ey >= (navBox.top + navBox.height)))) {
                                 menu.navItem.classList.remove(menu.navView.overItemCls);
                                 menu.hide();
                             }