CartTotal.vue 686 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template lang="pug">
  2. .cart-total
  3. h2
  4. small.cart-total-currency {{ currencySymbol }}
  5. |
  6. | {{ formatTotal() }}
  7. </template>
  8. <script>
  9. import { mapGetters } from 'vuex'
  10. export default {
  11. computed: mapGetters([
  12. 'total',
  13. 'currencySymbol'
  14. ]),
  15. methods: {
  16. formatTotal() {
  17. return accounting.format(this.total, 0, '.', ',')
  18. }
  19. }
  20. }
  21. </script>
  22. <style lang="sass">
  23. .cart-total
  24. width: 100%
  25. height: 50px
  26. h2
  27. width: 100%
  28. height: inherit
  29. margin: 0
  30. font-size: 30pt
  31. </style>