code refactor

This commit is contained in:
MaysWind
2023-07-16 22:55:02 +08:00
parent 41034de676
commit ed4040f2ec
5 changed files with 25 additions and 8 deletions
+4 -1
View File
@@ -80,7 +80,7 @@
>
<template #title>
<f7-block class="no-padding no-margin">
<span>{{ $t(`currency.${user.defaultCurrency}`) }}&nbsp;</span>
<span>{{ getCurrencyName(user.defaultCurrency) }}&nbsp;</span>
<small class="smaller">{{ user.defaultCurrency }}</small>
</f7-block>
</template>
@@ -399,6 +399,9 @@ export default {
}
});
},
getCurrencyName(currencyCode) {
return this.$locale.getCurrencyName(currencyCode);
},
getCategoryTypeName(categoryType) {
switch (categoryType) {
case categoryConstants.allCategoryTypes.Income.toString():