support currency symbol

This commit is contained in:
MaysWind
2020-11-22 14:31:32 +08:00
parent 9e1ec6d13c
commit 1e4fe9bd72
7 changed files with 659 additions and 164 deletions
+6 -4
View File
@@ -76,12 +76,14 @@ Vue.prototype.$locale = {
const allCurrencyCodes = currency.all;
const allCurrencies = [];
for (let i = 0; i < allCurrencyCodes.length; i++) {
const code = allCurrencyCodes[i];
for (let currencyCode in allCurrencyCodes) {
if (!Object.prototype.hasOwnProperty.call(allCurrencyCodes, currencyCode)) {
return;
}
allCurrencies.push({
code: code,
displayName: i18n.t(`currency.${code}`)
code: currencyCode,
displayName: i18n.t(`currency.${currencyCode}`)
});
}