mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
set default currency display mode to symbol
This commit is contained in:
@@ -45,12 +45,7 @@ export default function ({i18n}, value, currencyCode) {
|
|||||||
|
|
||||||
const currencyDisplayMode = settings.getCurrencyDisplayMode();
|
const currencyDisplayMode = settings.getCurrencyDisplayMode();
|
||||||
|
|
||||||
if (currencyDisplayMode === 'code') {
|
if (currencyDisplayMode === 'symbol') {
|
||||||
return `${value} ${currencyCode}`;
|
|
||||||
} else if (currencyDisplayMode === 'name') {
|
|
||||||
const currencyName = i18n.t(`currency.${currencyCode}`);
|
|
||||||
return `${value} ${currencyName}`;
|
|
||||||
} else if (currencyDisplayMode === 'symbol') {
|
|
||||||
const currencyInfo = currency.all[currencyCode];
|
const currencyInfo = currency.all[currencyCode];
|
||||||
let currencySymbol = currency.defaultCurrencySymbol;
|
let currencySymbol = currency.defaultCurrencySymbol;
|
||||||
|
|
||||||
@@ -64,6 +59,11 @@ export default function ({i18n}, value, currencyCode) {
|
|||||||
amount: value,
|
amount: value,
|
||||||
symbol: currencySymbol
|
symbol: currencySymbol
|
||||||
});
|
});
|
||||||
|
} else if (currencyDisplayMode === 'code') {
|
||||||
|
return `${value} ${currencyCode}`;
|
||||||
|
} else if (currencyDisplayMode === 'name') {
|
||||||
|
const currencyName = i18n.t(`currency.${currencyCode}`);
|
||||||
|
return `${value} ${currencyName}`;
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ const defaultSettings = {
|
|||||||
applicationLockWebAuthn: false,
|
applicationLockWebAuthn: false,
|
||||||
autoUpdateExchangeRatesData: true,
|
autoUpdateExchangeRatesData: true,
|
||||||
thousandsSeparator: true,
|
thousandsSeparator: true,
|
||||||
currencyDisplayMode: 'code', // or 'none' or 'name' or 'symbol'
|
currencyDisplayMode: 'symbol', // or 'none' or 'code' or 'name'
|
||||||
showAccountBalance: true,
|
showAccountBalance: true,
|
||||||
animate: false,
|
animate: false,
|
||||||
autoDarkMode: true
|
autoDarkMode: true
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
smart-select :smart-select-params="{ openIn: 'sheet', closeOnSelect: true, sheetCloseLinkText: $t('Done') }">
|
smart-select :smart-select-params="{ openIn: 'sheet', closeOnSelect: true, sheetCloseLinkText: $t('Done') }">
|
||||||
<select v-model="currencyDisplayMode">
|
<select v-model="currencyDisplayMode">
|
||||||
<option value="none">{{ $t('None') }}</option>
|
<option value="none">{{ $t('None') }}</option>
|
||||||
|
<option value="symbol">{{ $t('Currency Symbol') }}</option>
|
||||||
<option value="code">{{ $t('Currency Code') }}</option>
|
<option value="code">{{ $t('Currency Code') }}</option>
|
||||||
<option value="name">{{ $t('Currency Name') }}</option>
|
<option value="name">{{ $t('Currency Name') }}</option>
|
||||||
<option value="symbol">{{ $t('Currency Symbol') }}</option>
|
|
||||||
</select>
|
</select>
|
||||||
</f7-list-item>
|
</f7-list-item>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user