From aba474f7d8097f30726197725fe81e71e2987716 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 5 Dec 2020 21:47:37 +0800 Subject: [PATCH] don't show ellipsis icon in title when no data --- src/views/mobile/accounts/List.vue | 15 ++++++++++++++- src/views/mobile/categories/List.vue | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/views/mobile/accounts/List.vue b/src/views/mobile/accounts/List.vue index 0e8d2d63..735d2744 100644 --- a/src/views/mobile/accounts/List.vue +++ b/src/views/mobile/accounts/List.vue @@ -4,7 +4,7 @@ - + @@ -168,6 +168,19 @@ export default { defaultCurrency() { return this.$user.getUserInfo() ? this.$user.getUserInfo().defaultCurrency : this.$t('default.currency'); }, + allAccountCount() { + let allAccountCount = 0; + + for (let category in this.accounts) { + if (!Object.prototype.hasOwnProperty.call(this.accounts, category)) { + continue; + } + + allAccountCount += this.accounts[category].length; + } + + return allAccountCount; + }, noAvailableAccount() { let allAccountCount = 0; let shownAccountCount = 0; diff --git a/src/views/mobile/categories/List.vue b/src/views/mobile/categories/List.vue index f3262608..46c3c79e 100644 --- a/src/views/mobile/categories/List.vue +++ b/src/views/mobile/categories/List.vue @@ -4,7 +4,7 @@ - +