support setting decimal separator and digit grouping symbol

This commit is contained in:
MaysWind
2024-06-29 17:12:22 +08:00
parent d9c8142c51
commit 399413a270
51 changed files with 1280 additions and 582 deletions
+3 -5
View File
@@ -79,6 +79,7 @@
<script>
import { mapStores } from 'pinia';
import { useSettingsStore } from '@/stores/setting.js';
import { useUserStore } from '@/stores/user.js';
import colorConstants from '@/consts/color.js';
import { formatPercent } from '@/lib/numeral.js';
@@ -113,7 +114,7 @@ export default {
}
},
computed: {
...mapStores(useSettingsStore),
...mapStores(useSettingsStore, useUserStore),
validItems: function () {
let totalValidValue = 0;
@@ -272,10 +273,7 @@ export default {
return this.circumference - allPreviousLength + offset;
},
getDisplayCurrency(value, currencyCode) {
return this.$locale.getDisplayCurrency(value, currencyCode, {
currencyDisplayMode: this.settingsStore.appSettings.currencyDisplayMode,
enableThousandsSeparator: this.settingsStore.appSettings.thousandsSeparator
});
return this.$locale.formatAmountWithCurrency(this.settingsStore, this.userStore, value, currencyCode);
}
}
}