mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
hide search bar by clicking search icon
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
</f7-link>
|
</f7-link>
|
||||||
</f7-nav-title>
|
</f7-nav-title>
|
||||||
<f7-nav-right class="navbar-compact-icons">
|
<f7-nav-right class="navbar-compact-icons">
|
||||||
<f7-link icon-f7="search" @click="showSearchbar = true"></f7-link>
|
<f7-link icon-f7="search" @click="toggleSearchbar"></f7-link>
|
||||||
<f7-link icon-f7="plus" :class="{ 'disabled': !canAddTransaction }" @click="add"></f7-link>
|
<f7-link icon-f7="plus" :class="{ 'disabled': !canAddTransaction }" @click="add"></f7-link>
|
||||||
</f7-nav-right>
|
</f7-nav-right>
|
||||||
|
|
||||||
@@ -1300,6 +1300,18 @@ function filterMultipleTags(): void {
|
|||||||
props.f7router.navigate('/settings/filter/tag?type=transactionListCurrent');
|
props.f7router.navigate('/settings/filter/tag?type=transactionListCurrent');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleSearchbar(): void {
|
||||||
|
if (!showSearchbar.value) {
|
||||||
|
showSearchbar.value = true;
|
||||||
|
} else {
|
||||||
|
showSearchbar.value = false;
|
||||||
|
|
||||||
|
if (query.value.keyword) {
|
||||||
|
changeKeywordFilter('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeKeywordFilter(keyword: string): void {
|
function changeKeywordFilter(keyword: string): void {
|
||||||
if (query.value.keyword === keyword) {
|
if (query.value.keyword === keyword) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user