support set show/hide account balance in account list page

This commit is contained in:
MaysWind
2020-11-14 14:32:53 +08:00
parent d8424b8848
commit 514022181e
5 changed files with 25 additions and 1 deletions
+8 -1
View File
@@ -52,7 +52,7 @@
<f7-list sortable sortable-tap-hold :sortable-enabled="sortable" @sortable:sort="onSort">
<f7-list-item v-for="account in accounts[accountCategory.id]" v-show="showHidden || !account.hidden"
:key="account.id" :id="account | accountDomId"
:title="account.name" :after="account.balance | currency(account.currency)"
:title="account.name" :after="accountBalance(account) | currency(account.currency)"
link="#" swipeout @taphold.native="setSortable()"
>
<f7-swipeout-actions left v-if="sortable">
@@ -201,6 +201,13 @@ export default {
return shownCount > 0;
},
accountBalance(account) {
if (this.$settings.isShowAccountBalance()) {
return account.balance;
} else {
return '---';
}
},
setSortable() {
this.showHidden = true;
this.sortable = true;