From e717135aa986827ebf0a42cdee70ebf888d98987 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Tue, 29 Dec 2020 09:33:37 +0800
Subject: [PATCH] 优化顶部导航显示与交互

---
 layout/h5Page/CNavBar.vue |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/layout/h5Page/CNavBar.vue b/layout/h5Page/CNavBar.vue
index b5dbf3e..f694359 100644
--- a/layout/h5Page/CNavBar.vue
+++ b/layout/h5Page/CNavBar.vue
@@ -69,7 +69,7 @@
             }, 500);
         },
         outCloseMenu(evt) {
-            (() => {
+            setTimeout(() => {
                 // 未打开时,忽略
                 if (!this.dropShow) {
                     return;
@@ -79,12 +79,16 @@
                     return;
                 }
                 // 点击了菜单项,忽略
-                if (evt.target.className.indexOf('c-nav-bar-drop-item') >= 0) {
+                const className = evt.target.className;
+                if (
+                    className.indexOf('c-nav-bar-drop-item') >= 0 ||
+                    className.indexOf('at-nav-bar__container') >= 0
+                ) {
                     return;
                 }
                 // 执行关闭
                 this.dropShow = false;
-            })();
+            }, 0);
         },
     },
     mounted() {

--
Gitblit v1.9.1