You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="total-info tw-hidden tw-justify-between tw-items-center tw-p-5 tw-mb-[20px] tw-bg-white tw-rounded-xl xl:tw-flex">
  4. <div class="element total tw-flex tw-felx-start tw-items-center tw-flex-nowrap">
  5. <div class="label tw-body-2 tw-text-black tw-mr-[20px]">
  6. {{ $t("Total:") }}
  7. </div>
  8. <div class="content tw-body-2 tw-text-primary-1 tw-font-bold">
  9. ${{ total.toLocaleString() + currency }}
  10. </div>
  11. </div>
  12. <button
  13. class="btnPay tw-transition tw-btn-md tw-bg-primary-1 tw-px-[30px] tw-py-[9.5px] tw-rounded-2xl hover:tw-bg-primary-2"
  14. @click="payNow">
  15. {{ $t("Pay now") }}
  16. </button>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. name: "PcTotalInfo",
  22. props: {
  23. subTotal: {
  24. type: Number,
  25. },
  26. currency: {
  27. type: String,
  28. },
  29. },
  30. data() {
  31. return {};
  32. },
  33. computed: {
  34. total() {
  35. return this.subTotal.toLocaleString();
  36. },
  37. },
  38. methods: {
  39. payNow() {
  40. this.$emit('payNowClick');
  41. },
  42. },
  43. };
  44. </script>
  45. <style lang="scss" scoped>
  46. </style>