Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
debug dropdownMenu show or hide
Browse files Browse the repository at this point in the history
  • Loading branch information
MenglinChen committed Apr 3, 2019
1 parent c7e21a3 commit 9b3d4a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions DOCS/UPADTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
> 此处记录项目的开发进度
> (这会让项目开发变得紧紧有条)
2019-04-03

* view debug dropdownMenu 显示与隐藏方案存在bug 已解决

2019-04-02

* view dropdownMenu 显示与隐藏方案调整,优化体验
Expand Down
7 changes: 3 additions & 4 deletions View/src/components/system/DropdownMenu/dropdown-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b3d4a8

Please sign in to comment.