This commit is contained in:
2020-11-03 00:30:23 +00:00
parent bdfeabe03f
commit b6fdd9292e
4 changed files with 21 additions and 8 deletions

View File

@@ -7,11 +7,11 @@
v-bind="$attrs"
>
<template slot="main">
<div class="ml-4 mt-1 d-flex align-center">
<div>
max list items:{{ maxListItems }}
<span class="green--text">{{ obj }}</span>
</div>
<div class="ml-4 mt-1">
<template v-for="(item, i) in obj"
><span :key="i"
>{{ localizedCurrency(item[1].v) }} - {{ item[0].v }} <br /></span
></template>
</div>
</template>
</gz-dash>
@@ -33,7 +33,11 @@ export default {
GzDash
},
data() {
return { obj: [] };
return {
obj: [],
currencyName: window.$gz.locale.getCurrencyName(),
languageName: window.$gz.locale.getBrowserFirstLanguage()
};
},
props: {
maxListItems: { type: Number, default: 10 }
@@ -50,6 +54,13 @@ export default {
} else {
this.obj = [];
}
},
localizedCurrency(value) {
return window.$gz.locale.currencyLocalized(
value,
this.languageName,
this.currencyName
);
}
}
};