refactor: improve visible condition of global search component (#5976)

#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

#### What this PR does / why we need it:

优化 Console 的全局搜索对话框显示逻辑,改为未开启时不渲染组件。

#### Does this PR introduce a user-facing change?

```release-note
None
```
This commit is contained in:
Ryan Wang
2024-05-23 14:34:50 +08:00
committed by GitHub
parent 4d289c0a45
commit 34981f95ba
2 changed files with 26 additions and 47 deletions

View File

@@ -295,7 +295,10 @@ onMounted(() => {
</Teleport>
</div>
</div>
<GlobalSearchModal v-model:visible="globalSearchVisible" />
<GlobalSearchModal
v-if="globalSearchVisible"
@close="globalSearchVisible = false"
/>
<LoginModal />
</template>