Skip to content

Commit

Permalink
fix: 修复TagsView右键菜单逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Feb 7, 2024
1 parent 8794696 commit 901c891
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/TagsView/src/TagsView.vue
Expand Up @@ -210,13 +210,14 @@ const isActive = (route: RouteLocationNormalizedLoaded): boolean => {
// 所有右键菜单组件的元素
const itemRefs = useTemplateRefsList<ComponentRef<typeof ContextMenu & ContextMenuExpose>>()
// 右键菜单装填改变的时候
// 右键菜单状态改变的时候
const visibleChange = (visible: boolean, tagItem: RouteLocationNormalizedLoaded) => {
if (visible) {
for (const v of unref(itemRefs)) {
const elDropdownMenuRef = v.elDropdownMenuRef
if (tagItem.fullPath !== v.tagItem.fullPath) {
elDropdownMenuRef?.handleClose()
setSelectTag(tagItem)
}
}
}
Expand Down

0 comments on commit 901c891

Please sign in to comment.