From 9b3d4a8b82e83567541b551c99d991e940f0b8d1 Mon Sep 17 00:00:00 2001 From: MenglinChen <2900810740@qq.com> Date: Wed, 3 Apr 2019 13:33:34 +0800 Subject: [PATCH] debug dropdownMenu show or hide --- DOCS/UPADTE.md | 4 ++++ View/src/components/system/DropdownMenu/dropdown-menu.vue | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/DOCS/UPADTE.md b/DOCS/UPADTE.md index 8f4945e..cc262e6 100644 --- a/DOCS/UPADTE.md +++ b/DOCS/UPADTE.md @@ -3,6 +3,10 @@ > 此处记录项目的开发进度 > (这会让项目开发变得紧紧有条) +2019-04-03 + +* view debug dropdownMenu 显示与隐藏方案存在bug 已解决 + 2019-04-02 * view dropdownMenu 显示与隐藏方案调整,优化体验 diff --git a/View/src/components/system/DropdownMenu/dropdown-menu.vue b/View/src/components/system/DropdownMenu/dropdown-menu.vue index c43bfc5..58507a4 100644 --- a/View/src/components/system/DropdownMenu/dropdown-menu.vue +++ b/View/src/components/system/DropdownMenu/dropdown-menu.vue @@ -35,12 +35,11 @@ export default { hindeMenu: function (event) { const e = event.target // 判断鼠标点击位置是否在菜单内,如果是则不隐藏,如果不是则隐藏 - this.isChildById(e, 'dropdownMenuTooltip') - + this.isChildById(e, 'dropdownMenu') + }, isChildById: function (e, id) { - if (!(e || e.nodeName) || ['#document', 'HTML', 'BODY'].includes(e.nodeName)) - return this.show = false + if (!(e || e.nodeName) || ['#document', 'HTML', 'BODY'].includes(e.nodeName)) return this.show = false e = e.parentNode if (e.id && e.id == id) return this.isChildById(e, id)