|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="menu-container">
|
|
|
- <div class="search-box">
|
|
|
+ <div ref="searchBoxRef" class="search-box">
|
|
|
<input v-model="searchState.searchText" class="input" @keyup.enter="changeSearchText" />
|
|
|
<div v-show="searchState.showList" class="search-content">
|
|
|
<div class="search-title">全局搜索</div>
|
|
@@ -153,6 +153,10 @@ const searchState = reactive({
|
|
|
});
|
|
|
let showDialog = ref(false);
|
|
|
let videoMonitorData = ref([]);
|
|
|
+let searchBoxRef = ref();
|
|
|
+onClickOutside(searchBoxRef, (event) => {
|
|
|
+ searchState.showList = false;
|
|
|
+});
|
|
|
const changeSearchText = () => {
|
|
|
if (!searchState.searchText) {
|
|
|
searchState.showList = false;
|