code refactor

This commit is contained in:
MaysWind
2023-07-07 23:48:32 +08:00
parent 062a13b2c2
commit 9d0b874488
3 changed files with 29 additions and 44 deletions
@@ -270,28 +270,7 @@ export default {
computed: {
...mapStores(useRootStore, useSettingsStore, useUserStore, useAccountsStore),
allLanguages() {
const ret = [];
const allLanguageInfo = this.$locale.getAllLanguageInfos();
ret.push({
code: '',
displayName: this.$t('System Default')
});
for (let code in allLanguageInfo) {
if (!Object.prototype.hasOwnProperty.call(allLanguageInfo, code)) {
continue;
}
const languageInfo = allLanguageInfo[code];
ret.push({
code: code,
displayName: languageInfo.displayName
});
}
return ret;
return this.$locale.getAllLanguageInfoArray(true);
},
allCurrencies() {
return this.$locale.getAllCurrencies();