mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 00:06:15 -04:00
feat(search): round and clearable searchbar
This commit is contained in:
parent
d55329f3ab
commit
b112f5f226
1 changed files with 9 additions and 11 deletions
|
@ -33,17 +33,15 @@ function onSelect(path: string) {
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<n-auto-complete
|
||||
placeholder="Search a tool..."
|
||||
:options="options"
|
||||
v-model:value="queryString"
|
||||
:input-props="{ autocomplete: 'disabled' }"
|
||||
:on-select="onSelect"
|
||||
>
|
||||
<template #prefix>
|
||||
<n-icon>
|
||||
<search-round />
|
||||
</n-icon>
|
||||
<n-auto-complete :options="options" v-model:value="queryString" :input-props="{ autocomplete: 'disabled' }"
|
||||
:on-select="onSelect">
|
||||
<template #default="{ handleInput, handleBlur, handleFocus, value: slotValue }">
|
||||
<n-input round clearable placeholder="Search a tool..." :value="slotValue" @input="handleInput"
|
||||
@focus="handleFocus" @blur="handleBlur">
|
||||
<template #prefix>
|
||||
<n-icon :component="SearchRound" />
|
||||
</template>
|
||||
</n-input>
|
||||
</template>
|
||||
</n-auto-complete>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue