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.

48 lines
1.5 KiB

2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div class="tw-bg-white tw-w-[340px] tw-rounded-[25px] tw-relative">
  4. <img class="tw-absolute tw-right-5 tw-top-5" src="~/assets/svg/heart-outline.svg" alt="">
  5. <div class="tw-mb-[10px]">
  6. <img class="tw-w-full tw-rounded-t-[25px] tw-h-[196px]" src="~/assets/img/serviceExample.png" alt="">
  7. </div>
  8. <div class="tw-px-4 tw-pb-[9px]">
  9. <div class="tw-body-4 tw-text-neutrals-300 tw-flex tw-align-middle tw-mb-1">
  10. {{ service.country }} * {{ service.city }}
  11. </div>
  12. <div class="tw-body-4 tw-text-neutrals-600 tw-font-medium tw-mb-[6px]">
  13. {{ service.title }}
  14. </div>
  15. <div class="tw-body-3 tw-text-right tw-text-neutrals-300 tw-line-through">
  16. ${{ formatTotal(service.total) }}
  17. </div>
  18. <div class="tw-flex tw-justify-between">
  19. <div>
  20. <span class="tw-body-4 tw-text-primary-1">{{ service.rating }}</span>
  21. <img class="tw-mr-[6px]" src="~/assets/svg/reviewStar.svg" alt="">
  22. <span>{{ `(${service.reviews} ` }}reviews)</span>
  23. </div>
  24. <div class="tw-body-3 tw-text-primary-1">
  25. ${{ formatTotal(service.total) }}&nbsp;NTD
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. export default {
  34. props: {
  35. service: {
  36. type:Object
  37. }
  38. },
  39. computed: {
  40. formatTotal() {
  41. return function(total) {
  42. return total.toLocaleString('en-US')
  43. }
  44. }
  45. }
  46. };
  47. </script>
  48. <style lang="scss" scoped></style>