-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ZTL-UwU <[email protected]>
- Loading branch information
Showing
7 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
<template> | ||
<UiButton | ||
v-if="enable" | ||
variant="outline" | ||
class="pr-1.5 h-8 self-center w-full rounded-md font-normal text-muted-foreground hover:text-accent-foreground" | ||
:class="[inAside ? 'mb-4' : 'md:w-40 lg:w-64']" | ||
@click="isOpen = true" | ||
> | ||
<span class="overflow-hidden mr-auto"> | ||
Search... | ||
</span> | ||
<Kbd class="hidden md:block ml-auto"> | ||
<span class="text-xs">⌘</span>K | ||
</Kbd> | ||
</UiButton> | ||
<template v-if="enable"> | ||
<UiButton | ||
v-if="style === 'input'" | ||
variant="outline" | ||
class="pr-1.5 h-8 self-center w-full rounded-md font-normal text-muted-foreground hover:text-accent-foreground" | ||
:class="[inAside ? 'mb-4' : 'md:w-40 lg:w-64']" | ||
@click="isOpen = true" | ||
> | ||
<span class="overflow-hidden mr-auto"> | ||
Search... | ||
</span> | ||
<Kbd class="hidden md:block ml-auto"> | ||
<span class="text-xs">⌘</span>K | ||
</Kbd> | ||
</UiButton> | ||
<UiButton | ||
v-else | ||
variant="ghost" | ||
size="icon" | ||
@click="isOpen = true" | ||
> | ||
<Icon name="lucide:search" size="16" /> | ||
</UiButton> | ||
</template> | ||
|
||
<LayoutSearchDialog v-model:open="isOpen" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const isOpen = ref(false); | ||
const { enable, inAside } = useConfig().value.search; | ||
const { enable, inAside, style } = useConfig().value.search; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters