fixed GdtBalance in tab visible

This commit is contained in:
ogerly 2022-04-19 15:08:21 +02:00
parent 1f6971d2b7
commit 2ddf9cb33b

View File

@ -1,6 +1,6 @@
<template>
<div class="pb-4">
<b-tabs content-class="" justified>
<b-tabs v-model="tabIndex" content-class="" justified>
<b-tab :title="`Gradido (${$n(balance, 'decimal')} GDD)`" class="px-4">
<p class="tab-tex">{{ $t('transaction.gdd-text') }}</p>
@ -53,11 +53,11 @@ export default {
data() {
return {
timestamp: Date.now(),
titleGdt: this.$t('gdt.gdt'),
transactionsGdt: [],
transactionGdtCount: 0,
currentPage: 1,
pageSize: 25,
tabIndex: 0,
}
},
methods: {
@ -87,6 +87,13 @@ export default {
this.$emit('update-transactions', pagination)
},
},
computed: {
titleGdt(boolean) {
if (this.tabIndex === 1)
return `${this.$t('gdt.gdt')} (${this.$n(this.GdtBalance, 'decimal')} GDT)`
return this.$t('gdt.gdt')
},
},
watch: {
currentPage() {
this.updateGdt()