total.vue
490 Bytes
<template>
<div class="totalwrap">
总计
<span v-for="item in this.$util.formatNumArr(totalNum)" :class="item !== ',' ? 'titlebg' : '' ">{{item}}</span>
</div>
</template>
<script>
export default {
name: 'total',
props: {
totalNum: String
},
data() {
return {
// initnum: this.$util.formatNumArr(this.totalNum)
}
}
}
</script>
<style scoped>
.totalwrap {
height: 40px;
color: #fff;
}
.titlebg {
background: #f00;
}
</style>