Skip to content

Commit d3cf750

Browse files
author
Hiram
committed
[optimize] not listen if search is not enabled
1 parent 445cd1f commit d3cf750

File tree

1 file changed

+5
-3
lines changed
  • src/renderer/src/components/common-nav

1 file changed

+5
-3
lines changed

src/renderer/src/components/common-nav/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ watch(
123123
124124
const emit = defineEmits(['changeKey', 'contextMenu']);
125125
126-
onClickOutside(headerOutsideRef, () => {
127-
isVisible.search = false;
128-
})
126+
if (props.search) {
127+
onClickOutside(headerOutsideRef, () => {
128+
isVisible.search = false;
129+
})
130+
}
129131
130132
const conButtonClick = (item: any, { x, y }: any) => {
131133
isVisible.contentMenu = true;

0 commit comments

Comments
 (0)