File tree 5 files changed +22
-29
lines changed
5 files changed +22
-29
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const open = ref(false);
69
69
<NInput
70
70
v-model:value =" debouncedSearch"
71
71
class =" search-input"
72
- :placeholder =" i18n('search ', 'navbar')"
72
+ :placeholder =" i18n('filter ', 'navbar')"
73
73
autosize
74
74
clearable
75
75
>
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const open = ref(false);
64
64
<NInput
65
65
v-model:value =" debouncedSearch"
66
66
class =" search-input"
67
- :placeholder =" i18n('search ')"
67
+ :placeholder =" i18n('filter ')"
68
68
autosize
69
69
clearable
70
70
>
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import {
3
+ NAutoComplete ,
3
4
NFlex ,
4
5
NIcon ,
5
- NInput ,
6
- NPopselect ,
7
6
NSelect ,
8
7
NSwitch ,
9
8
NTooltip ,
@@ -58,11 +57,6 @@ const historyOptions = computed(() =>
58
57
filteredHistory .value .map (value => ({ value , label: value })),
59
58
);
60
59
61
- const showHistory = computed (() => {
62
- if (! inputFocus .value ) return false ;
63
- return !! filteredHistory .value .length ;
64
- });
65
-
66
60
defineProps ({
67
61
parentElement: {
68
62
type: HTMLElement ,
@@ -201,29 +195,24 @@ onActivated(() => {
201
195
</NFlex >
202
196
</NFlex >
203
197
<template #trigger >
204
- <NPopselect
198
+ <NAutoComplete
199
+ ref =" inputRef"
205
200
v-model:value =" debouncedSearch"
201
+ class =" search-input"
202
+ :loading =" loading"
203
+ :disabled =" loading"
204
+ :placeholder =" i18n('search', 'navbar')"
205
+ autosize
206
+ clearable
207
+ :on-input-focus =" () => toggleFocus(true)"
208
+ :on-input-blur =" () => toggleFocus(false)"
206
209
:options =" historyOptions"
207
210
:to =" parentElement"
208
- :show =" showHistory"
209
211
>
210
- <NInput
211
- ref =" inputRef"
212
- v-model:value =" debouncedSearch"
213
- class =" search-input"
214
- :loading =" loading"
215
- :disabled =" loading"
216
- :placeholder =" i18n('search', 'navbar')"
217
- autosize
218
- clearable
219
- :on-input-focus =" () => toggleFocus(true)"
220
- :on-input-blur =" () => toggleFocus(false)"
221
- >
222
- <template #prefix >
223
- <NIcon :component =" IconLoop" />
224
- </template >
225
- </NInput >
226
- </NPopselect >
212
+ <template #prefix >
213
+ <NIcon :component =" IconLoop" />
214
+ </template >
215
+ </NAutoComplete >
227
216
</template >
228
217
</NTooltip >
229
218
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const renderTag = ({ option }: { option: SelectOption }) => option.label?.toStri
100
100
<NInput
101
101
v-model:value =" debouncedSearch"
102
102
class =" search-input"
103
- :placeholder =" i18n('search ', 'navbar')"
103
+ :placeholder =" i18n('filter ', 'navbar')"
104
104
autosize
105
105
clearable
106
106
>
Original file line number Diff line number Diff line change 6
6
"navbar__search" : {
7
7
"message" : " Search" ,
8
8
"description" : " Search placeholder."
9
+ },
10
+ "navbar__filter" : {
11
+ "message" : " Filter" ,
12
+ "description" : " Search placeholder."
9
13
}
10
14
}
You can’t perform that action at this time.
0 commit comments