問題:
My Vue component is like this :我的 Vue 組件是這樣的:
<template>
<div>
<div class="panel-group"v-for="item in list">
<div class="col-md-8">
<small>
Total: <b>{{ item.total }}</b>
</small>
</div>
</div>
</div>
</template>
<script>
export default {
...
computed: {
list: function() {
return this.$store.state.transaction.list
},
...
}
}
</script>
The result of {{ item.total }}
is {{ item.total }}
是
26000000 2600萬
But I want format it to be like this :但我想把它格式化成這樣:
26.000.000,00 26.000.000,00
In jquery or javascript, I can do it在 jquery 或 javascript 中,我可以做到
But, How to do it in vue component?但是,如何在 vue 組件中做到這一點?