feat(components): add GlobalSearch components

This commit is contained in:
燕博文
2024-03-06 10:59:40 +08:00
parent 05db8c08d5
commit 9ea878915e
8 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<script lang="ts" setup>
import { useBoolean } from '@sa/hooks';
import SearchModal from './components/search-modal.vue';
defineOptions({ name: 'GlobalSearch' });
const { bool: show, toggle } = useBoolean();
function handleSearch() {
toggle();
}
</script>
<template>
<ButtonIcon tooltip-content="搜索" @click="handleSearch">
<icon-uil-search class="text-20px" />
</ButtonIcon>
<SearchModal v-model:show="show" />
</template>
<style lang="scss" scoped></style>