This commit is contained in:
DESKTOP-FUDKNA8\znjsz
2024-04-28 16:55:21 +08:00
parent 253f182370
commit aa2ac270fc
4 changed files with 27 additions and 10 deletions

View File

@@ -12,7 +12,7 @@
<h2>{{ info.companyName }}</h2>
<ul>
<li v-for="item in info.items" :key="item.label">
{{ item.label }} {{ item.value | currency }}
{{ item.label }} {{ item.value | numberFilter }}
</li>
</ul>
</div>
@@ -35,8 +35,12 @@ export default {
},
},
filters: {
currency(value) {
return value.toLocaleString();
numberFilter(value) {
if (value != null && !isNaN(parseInt(value))) {
return parseInt(value).toLocaleString();
} else {
return '-';
}
},
},
data() {